PA00FN · theorem

qres_same_status_from_even_half_product_mod_two

Alpha v34 checked-use theorem · independently closed; not Stable

Modulo-two equality with an even half product gives equal residue status.

Current library: Alpha v34, 4,223 checked-use theorems; Stable remains 432. Historical first admissions, original proof editions, and non-admitted aliases are preserved. Exact original first-admission records.

Statement with defined notation

∀ p. ∀ q. ∀ e. ∀ f. ∀ h. ∀ k. (QRes(p,q)Even(e)) ∧ (Even(e)QRes(p,q)) ∧ ((¬QRes(p,q)Odd(e)) ∧ (Odd(e) → ¬QRes(p,q))) → (QRes(q,p)Even(f)) ∧ (Even(f)QRes(q,p)) ∧ ((¬QRes(q,p)Odd(f)) ∧ (Odd(f) → ¬QRes(q,p))) → ModEq(2,e + f,h · k)Even(h · k)QRes(p,q)QRes(q,p) ∨ ¬QRes(p,q) ∧ ¬QRes(q,p)

Every purple notation token opens its conservative definition. This is a reading surface; the compiler expands the statement before the unchanged kernel checks it.

Definitions used by this theorem

In the theorem statement

22 occurrences

In local proof propositions

9 occurrences

Exact expanded native-PA statement
forall p q e f h k. (((((exists qr_x_qrp_pq. exists qr_u_qrp_pq qr_v_qrp_pq. qr_x_qrp_pq * qr_x_qrp_pq + p * qr_u_qrp_pq = q + p * qr_v_qrp_pq) -> (exists qrp_even_e_even. e = 2 * qrp_even_e_even)) /\ ((exists qrp_even_e_even. e = 2 * qrp_even_e_even) -> (exists qr_x_qrp_pq. exists qr_u_qrp_pq qr_v_qrp_pq. qr_x_qrp_pq * qr_x_qrp_pq + p * qr_u_qrp_pq = q + p * qr_v_qrp_pq))) /\ (((~(exists qr_x_qrp_pq. exists qr_u_qrp_pq qr_v_qrp_pq. qr_x_qrp_pq * qr_x_qrp_pq + p * qr_u_qrp_pq = q + p * qr_v_qrp_pq)) -> (exists qrp_odd_e_odd. e = 2 * qrp_odd_e_odd + 1)) /\ ((exists qrp_odd_e_odd. e = 2 * qrp_odd_e_odd + 1) -> ~(exists qr_x_qrp_pq. exists qr_u_qrp_pq qr_v_qrp_pq. qr_x_qrp_pq * qr_x_qrp_pq + p * qr_u_qrp_pq = q + p * qr_v_qrp_pq))))) -> (((((exists qr_x_qrp_qp. exists qr_u_qrp_qp qr_v_qrp_qp. qr_x_qrp_qp * qr_x_qrp_qp + q * qr_u_qrp_qp = p + q * qr_v_qrp_qp) -> (exists qrp_even_f_even. f = 2 * qrp_even_f_even)) /\ ((exists qrp_even_f_even. f = 2 * qrp_even_f_even) -> (exists qr_x_qrp_qp. exists qr_u_qrp_qp qr_v_qrp_qp. qr_x_qrp_qp * qr_x_qrp_qp + q * qr_u_qrp_qp = p + q * qr_v_qrp_qp))) /\ (((~(exists qr_x_qrp_qp. exists qr_u_qrp_qp qr_v_qrp_qp. qr_x_qrp_qp * qr_x_qrp_qp + q * qr_u_qrp_qp = p + q * qr_v_qrp_qp)) -> (exists qrp_odd_f_odd. f = 2 * qrp_odd_f_odd + 1)) /\ ((exists qrp_odd_f_odd. f = 2 * qrp_odd_f_odd + 1) -> ~(exists qr_x_qrp_qp. exists qr_u_qrp_qp qr_v_qrp_qp. qr_x_qrp_qp * qr_x_qrp_qp + q * qr_u_qrp_qp = p + q * qr_v_qrp_qp))))) -> (exists qrp_u_count_product qrp_v_count_product. e + f + 2 * qrp_u_count_product = h * k + 2 * qrp_v_count_product) -> (exists qrp_even_half_product. h * k = 2 * qrp_even_half_product) -> ((((exists qr_x_qrp_pq. exists qr_u_qrp_pq qr_v_qrp_pq. qr_x_qrp_pq * qr_x_qrp_pq + p * qr_u_qrp_pq = q + p * qr_v_qrp_pq) /\ (exists qr_x_qrp_qp. exists qr_u_qrp_qp qr_v_qrp_qp. qr_x_qrp_qp * qr_x_qrp_qp + q * qr_u_qrp_qp = p + q * qr_v_qrp_qp)) \/ (~(exists qr_x_qrp_pq. exists qr_u_qrp_pq qr_v_qrp_pq. qr_x_qrp_pq * qr_x_qrp_pq + p * qr_u_qrp_pq = q + p * qr_v_qrp_pq) /\ ~(exists qr_x_qrp_qp. exists qr_u_qrp_qp qr_v_qrp_qp. qr_x_qrp_qp * qr_x_qrp_qp + q * qr_u_qrp_qp = p + q * qr_v_qrp_qp))))

Proof neighborhood

Direct theorem prerequisites

Direct theorem dependents

Definition-aware tactic body

Only local propositions introduced by have or suffices are compacted. The untrusted compiler re-expands each one before the original tactic script is replayed; defined notation is never accepted by the kernel. Open the exact replay line beneath every changed command.

Read the argument

Proof checkpoints

28 script commands · 5 reading checkpoints · 2 local claims

This is a reading aid, not a new proof or a proof-tree certificate. Checkpoint groups are consecutive commands, not inferred branch boundaries. Every step links to the preserved script.

Definition notation is shown below. Open the paired exact edition for the original native formulas. Source pairing is not a new equivalence certificate.

Named ingredients (2)
01Fix variables and assumptionsL1–10

Work with arbitrary variables or the premises of the current implication.

  1. L1
    intro p
  2. L2
    intro q
  3. L3
    intro e
  4. L4
    intro f
  5. L5
    intro h
  6. L6
    intro k
  7. L7
    intro heclass
  8. L8
    intro hfclass
  9. L9
    intro hmod
  10. L10
    intro hproduct
02Establish htransportL11–15

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply mod two preserves parity.

  1. L11
    have htransport : (Even(e + f) → Even(h · k)) ∧ (Even(h · k) → Even(e + f)) ∧ ((Odd(e + f) → Odd(h · k)) ∧ (Odd(h · k) → Odd(e + f)))Definitions: Even(e + f)Even(h · k)Odd(e + f)Odd(h · k)Original native command in the exact edition
  2. L12
    specialize mod_two_preserves_parity (e + f)
  3. L13
    specialize mod_two_preserves_parity (h * k)
  4. L14
    apply mod_two_preserves_parity
  5. L15
    exact hmod
03Separate the logical casesL16–17

Follow the explicit conjunction, disjunction, witness, or contradiction step recorded below.

  1. L16
    cases htransport
  2. L17
    cases htransport_left
04Establish hcountL18–27

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply htransport left right.

  1. L18
    have hcount : Even(e + f)Definitions: Even(e + f)Original native command in the exact edition
  2. L19
    apply htransport_left_right
  3. L20
    exact hproduct
  4. L21
    specialize qres_same_status_from_even_count_sum p
  5. L22
    specialize qres_same_status_from_even_count_sum q
  6. L23
    specialize qres_same_status_from_even_count_sum e
  7. L24
    specialize qres_same_status_from_even_count_sum f
  8. L25
    apply qres_same_status_from_even_count_sum
  9. L26
    exact heclass
  10. L27
    exact hfclass
05Use earlier factsL28–28

Instantiate or apply named facts and discharge the corresponding proof obligations.

  1. L28
    exact hcount

Library-wide reading audit

Original defined command ledger · 28 lines
  1. 0001intro p
  2. 0002intro q
  3. 0003intro e
  4. 0004intro f
  5. 0005intro h
  6. 0006intro k
  7. 0007intro heclass
  8. 0008intro hfclass
  9. 0009intro hmod
  10. 0010intro hproduct
  11. 0011have htransport : (Even(e + f)Even(h · k)) ∧ (Even(h · k)Even(e + f)) ∧ ((Odd(e + f)Odd(h · k)) ∧ (Odd(h · k)Odd(e + f)))
    Exact native replay linehave htransport : (((((exists qrp_even_transport_count. e + f = 2 * qrp_even_transport_count) -> (exists qrp_even_transport_product. h * k = 2 * qrp_even_transport_product)) /\ ((exists qrp_even_transport_product. h * k = 2 * qrp_even_transport_product) -> (exists qrp_even_transport_count. e + f = 2 * qrp_even_transport_count)))) /\ ((((exists qrp_odd_transport_count. e + f = 2 * qrp_odd_transport_count + 1) -> (exists qrp_odd_transport_product. h * k = 2 * qrp_odd_transport_product + 1)) /\ ((exists qrp_odd_transport_product. h * k = 2 * qrp_odd_transport_product + 1) -> (exists qrp_odd_transport_count. e + f = 2 * qrp_odd_transport_count + 1)))))
  12. 0012specialize mod_two_preserves_parity (e + f)
  13. 0013specialize mod_two_preserves_parity (h * k)
  14. 0014apply mod_two_preserves_parity
  15. 0015exact hmod
  16. 0016cases htransport
  17. 0017cases htransport_left
  18. 0018have hcount : Even(e + f)
    Exact native replay linehave hcount : exists qrp_even_transport_count. e + f = 2 * qrp_even_transport_count
  19. 0019apply htransport_left_right
  20. 0020exact hproduct
  21. 0021specialize qres_same_status_from_even_count_sum p
  22. 0022specialize qres_same_status_from_even_count_sum q
  23. 0023specialize qres_same_status_from_even_count_sum e
  24. 0024specialize qres_same_status_from_even_count_sum f
  25. 0025apply qres_same_status_from_even_count_sum
  26. 0026exact heclass
  27. 0027exact hfclass
  28. 0028exact hcount