GI0005

signed_code_floor_exists

Alpha v34 independently verified · alpha_closed; checked-use authorized; not Stable

Every canonical signed integer has a canonical floor quotient and a witnessed strict natural remainder for every positive divisor.

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.

Exact expanded first-order arithmetic statement

forall input m. ~(m = 0) -> exists quotient r. (exists sif_positive_total sif_negative_total sif_quotient_positive_total sif_quotient_negative_total. (((input = 2 * sif_positive_total /\ sif_negative_total = 0) \/ exists sd_half_sif_total_input. ((input = 2 * sd_half_sif_total_input + 1 /\ sif_positive_total = 0) /\ sif_negative_total = S sd_half_sif_total_input)) /\ (((quotient = 2 * sif_quotient_positive_total /\ sif_quotient_negative_total = 0) \/ exists sd_half_sif_total_quotient. ((quotient = 2 * sd_half_sif_total_quotient + 1 /\ sif_quotient_positive_total = 0) /\ sif_quotient_negative_total = S sd_half_sif_total_quotient)) /\ (((sif_positive_total) + (m) * (sif_quotient_negative_total) = ((sif_negative_total) + (m) * (sif_quotient_positive_total)) + (r) /\ exists sif_gap_total. sif_gap_total + S (r) = (m))))))

Constructive proof overview

Generated structural guide

Every canonical signed integer has a canonical floor quotient and a witnessed strict natural remainder for every positive divisor.

The unchanged tactic script uses 2 declared prerequisites and contains 28 exact native proof lines.

Alpha v34 checked-use · first admitted v28 · independently kernel and Lean verified; not Stable

Proof neighborhood

Direct dependencies

signed_decode_total Alpha theorem; checked-use authorized GI0004 signed_integer_canonical_floor_exists

Direct dependents

none

Formal native tactic body

Dependencies are introduced as named hypotheses before line 1. Local theorem links identify exact declared prerequisites. This exact body belongs to a complete independently kernel-checked constructive proof bundle and has Alpha checked-use authority; it does not imply Stable membership.

Read the argument

Proof checkpoints

28 script commands · 10 reading checkpoints · 1 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.

Named ingredients (1)
01Fix variables and assumptionsL1–3

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

  1. L1
    intro input
  2. L2
    intro m
  3. L3
    intro hm
02Use earlier factsL4–4

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

  1. L4
    specialize signed_decode_total input
03Separate the logical casesL5–6

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

  1. L5
    cases signed_decode_total
  2. L6
    cases signed_decode_total_witness
04Establish hfloorL7–12

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply signed integer canonical floor exists.

  1. L7
    have hfloor : exists code qp qn r. ((code = 2 * qp /\ qn = 0) \/ exists sd_half_sif_input_canonical. ((code = 2 * sd_half_sif_input_canonical + 1 /\ qp = 0) /\ qn = S sd_half_sif_input_canonical)) /\ (((x) + (m) * (qn) = ((x1) + (m) * (qp)) + (r) /\ exists sif_gap_input_canonical. sif_gap_input_canonical + S (r) = (m)))
  2. L8
    specialize signed_integer_canonical_floor_exists x
  3. L9
    specialize signed_integer_canonical_floor_exists x1
  4. L10
    specialize signed_integer_canonical_floor_exists m
  5. L11
    apply signed_integer_canonical_floor_exists
  6. L12
    exact hm
05Separate the logical casesL13–17

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

  1. L13
    cases hfloor
  2. L14
    cases hfloor_witness
  3. L15
    cases hfloor_witness_witness
  4. L16
    cases hfloor_witness_witness_witness
  5. L17
    cases hfloor_witness_witness_witness_witness
06Construct an explicit witnessL18–23

Supply the displayed value, then prove that it has the required property.

  1. L18
    exists x2
  2. L19
    exists x5
  3. L20
    exists x
  4. L21
    exists x1
  5. L22
    exists x3
  6. L23
    exists x4
07Separate the logical casesL24–24

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

  1. L24
    split
08Use earlier factsL25–25

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

  1. L25
    exact signed_decode_total_witness_witness
09Separate the logical casesL26–26

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

  1. L26
    split
10Use earlier factsL27–28

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

  1. L27
    exact hfloor_witness_witness_witness_witness_left
  2. L28
    exact hfloor_witness_witness_witness_witness_right

Library-wide reading audit

Original exact command ledger · 28 lines
  1. 0001intro input
  2. 0002intro m
  3. 0003intro hm
  4. 0004specialize signed_decode_total input
  5. 0005cases signed_decode_total
  6. 0006cases signed_decode_total_witness
  7. 0007have hfloor : exists code qp qn r. ((code = 2 * qp /\ qn = 0) \/ exists sd_half_sif_input_canonical. ((code = 2 * sd_half_sif_input_canonical + 1 /\ qp = 0) /\ qn = S sd_half_sif_input_canonical)) /\ (((x) + (m) * (qn) = ((x1) + (m) * (qp)) + (r) /\ exists sif_gap_input_canonical. sif_gap_input_canonical + S (r) = (m)))
  8. 0008specialize signed_integer_canonical_floor_exists x
  9. 0009specialize signed_integer_canonical_floor_exists x1
  10. 0010specialize signed_integer_canonical_floor_exists m
  11. 0011apply signed_integer_canonical_floor_exists
  12. 0012exact hm
  13. 0013cases hfloor
  14. 0014cases hfloor_witness
  15. 0015cases hfloor_witness_witness
  16. 0016cases hfloor_witness_witness_witness
  17. 0017cases hfloor_witness_witness_witness_witness
  18. 0018exists x2
  19. 0019exists x5
  20. 0020exists x
  21. 0021exists x1
  22. 0022exists x3
  23. 0023exists x4
  24. 0024split
  25. 0025exact signed_decode_total_witness_witness
  26. 0026split
  27. 0027exact hfloor_witness_witness_witness_witness_left
  28. 0028exact hfloor_witness_witness_witness_witness_right