CD001B

finite_bit_union_intersection_count_balance

The genuinely counted union and intersection have cardinalities summing exactly to those of both inputs.

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

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.

Sets are complete characteristic-bit codes with actual finite cardinality witnesses. The proof constructs translations and the sumset; no finite-choice oracle, supplied cardinality conclusion, or unproved polynomial-method premise is used.

Exact theorem in conservative defined notation

∀ ab. ∀ ac. ∀ bb. ∀ bc. ∀ ub. ∀ uc. ∀ ib. ∀ ic. ∀ l. ∀ n. ∀ m. ∀ q. ∀ r. BitCount(ab,ac,l,n)BitCount(bb,bc,l,m)BitCount(ub,uc,l,q)BitCount(ib,ic,l,r)ModularSetUnion(ab,ac,bb,bc,ub,uc,l)ModularSetIntersection(ab,ac,bb,bc,ib,ic,l) → q + r = n + m

Every linked abbreviation expands hygienically to the identical original native formula.

Definition DAG

Actual proof prerequisites

Original expanded first-order statement
forall ab ac bb bc ub uc ib ic l n m q r. (((exists ff_u_fms_count ff_v_fms_count. ((((exists ff_h_fms_count_start. ff_h_fms_count_start + S (0) = S ((S (0)) * ff_v_fms_count)) /\ exists ff_q_fms_count_start. ff_u_fms_count = ff_q_fms_count_start * S ((S (0)) * ff_v_fms_count) + (0))) /\ ((((exists ff_h_fms_count_terminal. ff_h_fms_count_terminal + S ((n)) = S ((S ((l))) * ff_v_fms_count)) /\ exists ff_q_fms_count_terminal. ff_u_fms_count = ff_q_fms_count_terminal * S ((S ((l))) * ff_v_fms_count) + ((n)))) /\ forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_a_fms_count ff_r_fms_count ff_s_fms_count. ((((exists ff_h_fms_count_summand. ff_h_fms_count_summand + S (ff_a_fms_count) = S ((S (ff_i_fms_count)) * (ac))) /\ exists ff_q_fms_count_summand. (ab) = ff_q_fms_count_summand * S ((S (ff_i_fms_count)) * (ac)) + (ff_a_fms_count))) /\ ((((exists ff_h_fms_count_partial. ff_h_fms_count_partial + S (ff_r_fms_count) = S ((S (ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_partial. ff_u_fms_count = ff_q_fms_count_partial * S ((S (ff_i_fms_count)) * ff_v_fms_count) + (ff_r_fms_count))) /\ ((((exists ff_h_fms_count_successor. ff_h_fms_count_successor + S (ff_s_fms_count) = S ((S (S ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_successor. ff_u_fms_count = ff_q_fms_count_successor * S ((S (S ff_i_fms_count)) * ff_v_fms_count) + (ff_s_fms_count))) /\ ff_s_fms_count = ff_r_fms_count + ff_a_fms_count)))))) /\ (forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_bit_fms_count. ((((exists ff_h_fms_count_decoded. ff_h_fms_count_decoded + S (ff_bit_fms_count) = S ((S (ff_i_fms_count)) * (ac))) /\ exists ff_q_fms_count_decoded. (ab) = ff_q_fms_count_decoded * S ((S (ff_i_fms_count)) * (ac)) + (ff_bit_fms_count))) /\ (ff_bit_fms_count = 0 \/ ff_bit_fms_count = 1))))) -> (((exists ff_u_fms_count ff_v_fms_count. ((((exists ff_h_fms_count_start. ff_h_fms_count_start + S (0) = S ((S (0)) * ff_v_fms_count)) /\ exists ff_q_fms_count_start. ff_u_fms_count = ff_q_fms_count_start * S ((S (0)) * ff_v_fms_count) + (0))) /\ ((((exists ff_h_fms_count_terminal. ff_h_fms_count_terminal + S ((m)) = S ((S ((l))) * ff_v_fms_count)) /\ exists ff_q_fms_count_terminal. ff_u_fms_count = ff_q_fms_count_terminal * S ((S ((l))) * ff_v_fms_count) + ((m)))) /\ forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_a_fms_count ff_r_fms_count ff_s_fms_count. ((((exists ff_h_fms_count_summand. ff_h_fms_count_summand + S (ff_a_fms_count) = S ((S (ff_i_fms_count)) * (bc))) /\ exists ff_q_fms_count_summand. (bb) = ff_q_fms_count_summand * S ((S (ff_i_fms_count)) * (bc)) + (ff_a_fms_count))) /\ ((((exists ff_h_fms_count_partial. ff_h_fms_count_partial + S (ff_r_fms_count) = S ((S (ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_partial. ff_u_fms_count = ff_q_fms_count_partial * S ((S (ff_i_fms_count)) * ff_v_fms_count) + (ff_r_fms_count))) /\ ((((exists ff_h_fms_count_successor. ff_h_fms_count_successor + S (ff_s_fms_count) = S ((S (S ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_successor. ff_u_fms_count = ff_q_fms_count_successor * S ((S (S ff_i_fms_count)) * ff_v_fms_count) + (ff_s_fms_count))) /\ ff_s_fms_count = ff_r_fms_count + ff_a_fms_count)))))) /\ (forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_bit_fms_count. ((((exists ff_h_fms_count_decoded. ff_h_fms_count_decoded + S (ff_bit_fms_count) = S ((S (ff_i_fms_count)) * (bc))) /\ exists ff_q_fms_count_decoded. (bb) = ff_q_fms_count_decoded * S ((S (ff_i_fms_count)) * (bc)) + (ff_bit_fms_count))) /\ (ff_bit_fms_count = 0 \/ ff_bit_fms_count = 1))))) -> (((exists ff_u_fms_count ff_v_fms_count. ((((exists ff_h_fms_count_start. ff_h_fms_count_start + S (0) = S ((S (0)) * ff_v_fms_count)) /\ exists ff_q_fms_count_start. ff_u_fms_count = ff_q_fms_count_start * S ((S (0)) * ff_v_fms_count) + (0))) /\ ((((exists ff_h_fms_count_terminal. ff_h_fms_count_terminal + S ((q)) = S ((S ((l))) * ff_v_fms_count)) /\ exists ff_q_fms_count_terminal. ff_u_fms_count = ff_q_fms_count_terminal * S ((S ((l))) * ff_v_fms_count) + ((q)))) /\ forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_a_fms_count ff_r_fms_count ff_s_fms_count. ((((exists ff_h_fms_count_summand. ff_h_fms_count_summand + S (ff_a_fms_count) = S ((S (ff_i_fms_count)) * (uc))) /\ exists ff_q_fms_count_summand. (ub) = ff_q_fms_count_summand * S ((S (ff_i_fms_count)) * (uc)) + (ff_a_fms_count))) /\ ((((exists ff_h_fms_count_partial. ff_h_fms_count_partial + S (ff_r_fms_count) = S ((S (ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_partial. ff_u_fms_count = ff_q_fms_count_partial * S ((S (ff_i_fms_count)) * ff_v_fms_count) + (ff_r_fms_count))) /\ ((((exists ff_h_fms_count_successor. ff_h_fms_count_successor + S (ff_s_fms_count) = S ((S (S ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_successor. ff_u_fms_count = ff_q_fms_count_successor * S ((S (S ff_i_fms_count)) * ff_v_fms_count) + (ff_s_fms_count))) /\ ff_s_fms_count = ff_r_fms_count + ff_a_fms_count)))))) /\ (forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_bit_fms_count. ((((exists ff_h_fms_count_decoded. ff_h_fms_count_decoded + S (ff_bit_fms_count) = S ((S (ff_i_fms_count)) * (uc))) /\ exists ff_q_fms_count_decoded. (ub) = ff_q_fms_count_decoded * S ((S (ff_i_fms_count)) * (uc)) + (ff_bit_fms_count))) /\ (ff_bit_fms_count = 0 \/ ff_bit_fms_count = 1))))) -> (((exists ff_u_fms_count ff_v_fms_count. ((((exists ff_h_fms_count_start. ff_h_fms_count_start + S (0) = S ((S (0)) * ff_v_fms_count)) /\ exists ff_q_fms_count_start. ff_u_fms_count = ff_q_fms_count_start * S ((S (0)) * ff_v_fms_count) + (0))) /\ ((((exists ff_h_fms_count_terminal. ff_h_fms_count_terminal + S ((r)) = S ((S ((l))) * ff_v_fms_count)) /\ exists ff_q_fms_count_terminal. ff_u_fms_count = ff_q_fms_count_terminal * S ((S ((l))) * ff_v_fms_count) + ((r)))) /\ forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_a_fms_count ff_r_fms_count ff_s_fms_count. ((((exists ff_h_fms_count_summand. ff_h_fms_count_summand + S (ff_a_fms_count) = S ((S (ff_i_fms_count)) * (ic))) /\ exists ff_q_fms_count_summand. (ib) = ff_q_fms_count_summand * S ((S (ff_i_fms_count)) * (ic)) + (ff_a_fms_count))) /\ ((((exists ff_h_fms_count_partial. ff_h_fms_count_partial + S (ff_r_fms_count) = S ((S (ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_partial. ff_u_fms_count = ff_q_fms_count_partial * S ((S (ff_i_fms_count)) * ff_v_fms_count) + (ff_r_fms_count))) /\ ((((exists ff_h_fms_count_successor. ff_h_fms_count_successor + S (ff_s_fms_count) = S ((S (S ff_i_fms_count)) * ff_v_fms_count)) /\ exists ff_q_fms_count_successor. ff_u_fms_count = ff_q_fms_count_successor * S ((S (S ff_i_fms_count)) * ff_v_fms_count) + (ff_s_fms_count))) /\ ff_s_fms_count = ff_r_fms_count + ff_a_fms_count)))))) /\ (forall ff_i_fms_count. (exists ff_lt_fms_count_bound. ff_lt_fms_count_bound + S ff_i_fms_count = (l)) -> exists ff_bit_fms_count. ((((exists ff_h_fms_count_decoded. ff_h_fms_count_decoded + S (ff_bit_fms_count) = S ((S (ff_i_fms_count)) * (ic))) /\ exists ff_q_fms_count_decoded. (ib) = ff_q_fms_count_decoded * S ((S (ff_i_fms_count)) * (ic)) + (ff_bit_fms_count))) /\ (ff_bit_fms_count = 0 \/ ff_bit_fms_count = 1))))) -> (forall fms_i_binary. (exists fms_gap_binary. fms_gap_binary + S (fms_i_binary) = (l)) -> ((((((exists fs_h_fms_binary_result. fs_h_fms_binary_result + S (1) = S ((S (fms_i_binary)) * uc)) /\ exists fs_q_fms_binary_result. ub = fs_q_fms_binary_result * S ((S (fms_i_binary)) * uc) + (1))) -> (((((exists fs_h_fms_binary_left. fs_h_fms_binary_left + S (1) = S ((S (fms_i_binary)) * ac)) /\ exists fs_q_fms_binary_left. ab = fs_q_fms_binary_left * S ((S (fms_i_binary)) * ac) + (1))) \/ (((exists fs_h_fms_binary_right. fs_h_fms_binary_right + S (1) = S ((S (fms_i_binary)) * bc)) /\ exists fs_q_fms_binary_right. bb = fs_q_fms_binary_right * S ((S (fms_i_binary)) * bc) + (1)))))) /\ ((((((exists fs_h_fms_binary_left. fs_h_fms_binary_left + S (1) = S ((S (fms_i_binary)) * ac)) /\ exists fs_q_fms_binary_left. ab = fs_q_fms_binary_left * S ((S (fms_i_binary)) * ac) + (1))) \/ (((exists fs_h_fms_binary_right. fs_h_fms_binary_right + S (1) = S ((S (fms_i_binary)) * bc)) /\ exists fs_q_fms_binary_right. bb = fs_q_fms_binary_right * S ((S (fms_i_binary)) * bc) + (1))))) -> (((exists fs_h_fms_binary_result. fs_h_fms_binary_result + S (1) = S ((S (fms_i_binary)) * uc)) /\ exists fs_q_fms_binary_result. ub = fs_q_fms_binary_result * S ((S (fms_i_binary)) * uc) + (1))))))) -> (forall fms_i_binary. (exists fms_gap_binary. fms_gap_binary + S (fms_i_binary) = (l)) -> ((((((exists fs_h_fms_binary_result. fs_h_fms_binary_result + S (1) = S ((S (fms_i_binary)) * ic)) /\ exists fs_q_fms_binary_result. ib = fs_q_fms_binary_result * S ((S (fms_i_binary)) * ic) + (1))) -> (((((exists fs_h_fms_binary_left. fs_h_fms_binary_left + S (1) = S ((S (fms_i_binary)) * ac)) /\ exists fs_q_fms_binary_left. ab = fs_q_fms_binary_left * S ((S (fms_i_binary)) * ac) + (1))) /\ (((exists fs_h_fms_binary_right. fs_h_fms_binary_right + S (1) = S ((S (fms_i_binary)) * bc)) /\ exists fs_q_fms_binary_right. bb = fs_q_fms_binary_right * S ((S (fms_i_binary)) * bc) + (1)))))) /\ ((((((exists fs_h_fms_binary_left. fs_h_fms_binary_left + S (1) = S ((S (fms_i_binary)) * ac)) /\ exists fs_q_fms_binary_left. ab = fs_q_fms_binary_left * S ((S (fms_i_binary)) * ac) + (1))) /\ (((exists fs_h_fms_binary_right. fs_h_fms_binary_right + S (1) = S ((S (fms_i_binary)) * bc)) /\ exists fs_q_fms_binary_right. bb = fs_q_fms_binary_right * S ((S (fms_i_binary)) * bc) + (1))))) -> (((exists fs_h_fms_binary_result. fs_h_fms_binary_result + S (1) = S ((S (fms_i_binary)) * ic)) /\ exists fs_q_fms_binary_result. ib = fs_q_fms_binary_result * S ((S (fms_i_binary)) * ic) + (1))))))) -> q+r=n+m

Complete tactic proof in conservative notation

All 178 original proof lines are preserved. Only local proposition formulas are abbreviated; every abbreviation has an exact binder-safe expansion check. The linked exact edition contains the unchanged replay script.

Read the argument

Proof checkpoints

178 script commands · 46 reading checkpoints · 8 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 (4)
01Fix variables and assumptionsL1–10

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

  1. L1
    intro ab
  2. L2
    intro ac
  3. L3
    intro bb
  4. L4
    intro bc
  5. L5
    intro ub
  6. L6
    intro uc
  7. L7
    intro ib
  8. L8
    intro ic
  9. L9
    intro l
  10. L10
    intro n
02Fix variables and assumptionsL11–19

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

  1. L11
    intro m
  2. L12
    intro q
  3. L13
    intro r
  4. L14
    intro hA
  5. L15
    intro hB
  6. L16
    intro hU
  7. L17
    intro hI
  8. L18
    intro hUnion
  9. L19
    intro hInter
03Separate the logical casesL20–23

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

  1. L20
    cases hA
  2. L21
    cases hB
  3. L22
    cases hU
  4. L23
    cases hI
04Use earlier factsL24–33

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

  1. L24
    specialize finite_sum_pointwise_balance ub
  2. L25
    specialize finite_sum_pointwise_balance uc
  3. L26
    specialize finite_sum_pointwise_balance ib
  4. L27
    specialize finite_sum_pointwise_balance ic
  5. L28
    specialize finite_sum_pointwise_balance ab
  6. L29
    specialize finite_sum_pointwise_balance ac
  7. L30
    specialize finite_sum_pointwise_balance bb
  8. L31
    specialize finite_sum_pointwise_balance bc
  9. L32
    specialize finite_sum_pointwise_balance l
  10. L33
    specialize finite_sum_pointwise_balance q
05Use earlier factsL34–41

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

  1. L34
    specialize finite_sum_pointwise_balance r
  2. L35
    specialize finite_sum_pointwise_balance n
  3. L36
    specialize finite_sum_pointwise_balance m
  4. L37
    apply finite_sum_pointwise_balance
  5. L38
    exact hU_left
  6. L39
    exact hI_left
  7. L40
    exact hA_left
  8. L41
    exact hB_left
06Fix variables and assumptionsL42–51

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

  1. L42
    intro i
  2. L43
    intro u
  3. L44
    intro v
  4. L45
    intro a
  5. L46
    intro b
  6. L47
    intro hi
  7. L48
    intro hu
  8. L49
    intro hv
  9. L50
    intro ha
  10. L51
    intro hb
07Establish hAeL52–58

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite beta value one iff.

  1. L52
    have hAe : (a = 1 → BetaAt(ab,ac,i,1)) ∧ (BetaAt(ab,ac,i,1) → a = 1)Definitions: BetaAt(ab,ac,i,1)Original native command in the exact edition
  2. L53
    specialize finite_beta_value_one_iff ab
  3. L54
    specialize finite_beta_value_one_iff ac
  4. L55
    specialize finite_beta_value_one_iff i
  5. L56
    specialize finite_beta_value_one_iff a
  6. L57
    apply finite_beta_value_one_iff
  7. L58
    exact ha
08Separate the logical casesL59–59

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

  1. L59
    cases hAe
09Establish hBeL60–66

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite beta value one iff.

  1. L60
    have hBe : (b = 1 → BetaAt(bb,bc,i,1)) ∧ (BetaAt(bb,bc,i,1) → b = 1)Definitions: BetaAt(bb,bc,i,1)Original native command in the exact edition
  2. L61
    specialize finite_beta_value_one_iff bb
  3. L62
    specialize finite_beta_value_one_iff bc
  4. L63
    specialize finite_beta_value_one_iff i
  5. L64
    specialize finite_beta_value_one_iff b
  6. L65
    apply finite_beta_value_one_iff
  7. L66
    exact hb
10Separate the logical casesL67–67

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

  1. L67
    cases hBe
11Establish hUeL68–74

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite beta value one iff.

  1. L68
    have hUe : (u = 1 → BetaAt(ub,uc,i,1)) ∧ (BetaAt(ub,uc,i,1) → u = 1)Definitions: BetaAt(ub,uc,i,1)Original native command in the exact edition
  2. L69
    specialize finite_beta_value_one_iff ub
  3. L70
    specialize finite_beta_value_one_iff uc
  4. L71
    specialize finite_beta_value_one_iff i
  5. L72
    specialize finite_beta_value_one_iff u
  6. L73
    apply finite_beta_value_one_iff
  7. L74
    exact hu
12Separate the logical casesL75–75

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

  1. L75
    cases hUe
13Establish hIeL76–82

Establish this local claim before using it. It is not an additional assumption. The following proof commands apply finite beta value one iff.

  1. L76
    have hIe : (v = 1 → BetaAt(ib,ic,i,1)) ∧ (BetaAt(ib,ic,i,1) → v = 1)Definitions: BetaAt(ib,ic,i,1)Original native command in the exact edition
  2. L77
    specialize finite_beta_value_one_iff ib
  3. L78
    specialize finite_beta_value_one_iff ic
  4. L79
    specialize finite_beta_value_one_iff i
  5. L80
    specialize finite_beta_value_one_iff v
  6. L81
    apply finite_beta_value_one_iff
  7. L82
    exact hv
14Separate the logical casesL83–83

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

  1. L83
    cases hIe
15Establish hUnL84–87

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

  1. L84
    have hUn : (BetaAt(ub,uc,i,1) → BetaAt(ab,ac,i,1) ∨ BetaAt(bb,bc,i,1)) ∧ (BetaAt(ab,ac,i,1) ∨ BetaAt(bb,bc,i,1) → BetaAt(ub,uc,i,1))Definitions: BetaAt(ub,uc,i,1)BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)Original native command in the exact edition
  2. L85
    specialize hUnion i
  3. L86
    apply hUnion
  4. L87
    exact hi
16Separate the logical casesL88–88

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

  1. L88
    cases hUn
17Establish hInL89–92

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

  1. L89
    have hIn : (BetaAt(ib,ic,i,1) → BetaAt(ab,ac,i,1) ∧ BetaAt(bb,bc,i,1)) ∧ (BetaAt(ab,ac,i,1) ∧ BetaAt(bb,bc,i,1) → BetaAt(ib,ic,i,1))Definitions: BetaAt(ib,ic,i,1)BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)Original native command in the exact edition
  2. L90
    specialize hInter i
  3. L91
    apply hInter
  4. L92
    exact hi
18Separate the logical casesL93–93

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

  1. L93
    cases hIn
19Use earlier factsL94–103

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

  1. L94
    specialize finite_bit_union_intersection_values a
  2. L95
    specialize finite_bit_union_intersection_values b
  3. L96
    specialize finite_bit_union_intersection_values u
  4. L97
    specialize finite_bit_union_intersection_values v
  5. L98
    apply finite_bit_union_intersection_values
  6. L99
    specialize finite_bit_entry_cases ab
  7. L100
    specialize finite_bit_entry_cases ac
  8. L101
    specialize finite_bit_entry_cases l
  9. L102
    specialize finite_bit_entry_cases i
  10. L103
    specialize finite_bit_entry_cases a
20Use earlier factsL104–113

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

  1. L104
    apply finite_bit_entry_cases
  2. L105
    exact hA_right
  3. L106
    exact hi
  4. L107
    exact ha
  5. L108
    specialize finite_bit_entry_cases bb
  6. L109
    specialize finite_bit_entry_cases bc
  7. L110
    specialize finite_bit_entry_cases l
  8. L111
    specialize finite_bit_entry_cases i
  9. L112
    specialize finite_bit_entry_cases b
  10. L113
    apply finite_bit_entry_cases
21Use earlier factsL114–123

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

  1. L114
    exact hB_right
  2. L115
    exact hi
  3. L116
    exact hb
  4. L117
    specialize finite_bit_entry_cases ub
  5. L118
    specialize finite_bit_entry_cases uc
  6. L119
    specialize finite_bit_entry_cases l
  7. L120
    specialize finite_bit_entry_cases i
  8. L121
    specialize finite_bit_entry_cases u
  9. L122
    apply finite_bit_entry_cases
  10. L123
    exact hU_right
22Use earlier factsL124–133

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

  1. L124
    exact hi
  2. L125
    exact hu
  3. L126
    specialize finite_bit_entry_cases ib
  4. L127
    specialize finite_bit_entry_cases ic
  5. L128
    specialize finite_bit_entry_cases l
  6. L129
    specialize finite_bit_entry_cases i
  7. L130
    specialize finite_bit_entry_cases v
  8. L131
    apply finite_bit_entry_cases
  9. L132
    exact hI_right
  10. L133
    exact hi
23Use earlier factsL134–134

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

  1. L134
    exact hv
24Separate the logical casesL135–135

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

  1. L135
    split
25Fix variables and assumptionsL136–136

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

  1. L136
    intro hue
26Establish habL137–140

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

  1. L137
    have hab : BetaAt(ab,ac,i,1) ∨ BetaAt(bb,bc,i,1)Definitions: BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)Original native command in the exact edition
  2. L138
    apply hUn_left
  3. L139
    apply hUe_left
  4. L140
    exact hue
27Separate the logical casesL141–142

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

  1. L141
    cases hab
  2. L142
    left
28Use earlier factsL143–144

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

  1. L143
    apply hAe_right
  2. L144
    exact hab_left
29Separate the logical casesL145–145

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

  1. L145
    right
30Use earlier factsL146–147

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

  1. L146
    apply hBe_right
  2. L147
    exact hab_right
31Fix variables and assumptionsL148–148

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

  1. L148
    intro hab
32Use earlier factsL149–150

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

  1. L149
    apply hUe_right
  2. L150
    apply hUn_right
33Separate the logical casesL151–152

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

  1. L151
    cases hab
  2. L152
    left
34Use earlier factsL153–154

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

  1. L153
    apply hAe_left
  2. L154
    exact hab_left
35Separate the logical casesL155–155

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

  1. L155
    right
36Use earlier factsL156–157

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

  1. L156
    apply hBe_left
  2. L157
    exact hab_right
37Separate the logical casesL158–158

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

  1. L158
    split
38Fix variables and assumptionsL159–159

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

  1. L159
    intro hie
39Establish habL160–163

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

  1. L160
    have hab : BetaAt(ab,ac,i,1) ∧ BetaAt(bb,bc,i,1)Definitions: BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)Original native command in the exact edition
  2. L161
    apply hIn_left
  3. L162
    apply hIe_left
  4. L163
    exact hie
40Separate the logical casesL164–165

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

  1. L164
    cases hab
  2. L165
    split
41Use earlier factsL166–169

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

  1. L166
    apply hAe_right
  2. L167
    exact hab_left
  3. L168
    apply hBe_right
  4. L169
    exact hab_right
42Fix variables and assumptionsL170–170

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

  1. L170
    intro hab
43Separate the logical casesL171–171

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

  1. L171
    cases hab
44Use earlier factsL172–173

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

  1. L172
    apply hIe_right
  2. L173
    apply hIn_right
45Separate the logical casesL174–174

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

  1. L174
    split
46Use earlier factsL175–178

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

  1. L175
    apply hAe_left
  2. L176
    exact hab_left
  3. L177
    apply hBe_left
  4. L178
    exact hab_right

Library-wide reading audit

Original defined command ledger · 178 lines
  1. 0001intro ab
  2. 0002intro ac
  3. 0003intro bb
  4. 0004intro bc
  5. 0005intro ub
  6. 0006intro uc
  7. 0007intro ib
  8. 0008intro ic
  9. 0009intro l
  10. 0010intro n
  11. 0011intro m
  12. 0012intro q
  13. 0013intro r
  14. 0014intro hA
  15. 0015intro hB
  16. 0016intro hU
  17. 0017intro hI
  18. 0018intro hUnion
  19. 0019intro hInter
  20. 0020cases hA
  21. 0021cases hB
  22. 0022cases hU
  23. 0023cases hI
  24. 0024specialize finite_sum_pointwise_balance ub
  25. 0025specialize finite_sum_pointwise_balance uc
  26. 0026specialize finite_sum_pointwise_balance ib
  27. 0027specialize finite_sum_pointwise_balance ic
  28. 0028specialize finite_sum_pointwise_balance ab
  29. 0029specialize finite_sum_pointwise_balance ac
  30. 0030specialize finite_sum_pointwise_balance bb
  31. 0031specialize finite_sum_pointwise_balance bc
  32. 0032specialize finite_sum_pointwise_balance l
  33. 0033specialize finite_sum_pointwise_balance q
  34. 0034specialize finite_sum_pointwise_balance r
  35. 0035specialize finite_sum_pointwise_balance n
  36. 0036specialize finite_sum_pointwise_balance m
  37. 0037apply finite_sum_pointwise_balance
  38. 0038exact hU_left
  39. 0039exact hI_left
  40. 0040exact hA_left
  41. 0041exact hB_left
  42. 0042intro i
  43. 0043intro u
  44. 0044intro v
  45. 0045intro a
  46. 0046intro b
  47. 0047intro hi
  48. 0048intro hu
  49. 0049intro hv
  50. 0050intro ha
  51. 0051intro hb
  52. 0052have hAe : (a = 1 → BetaAt(ab,ac,i,1)) ∧ (BetaAt(ab,ac,i,1) → a = 1)
  53. 0053specialize finite_beta_value_one_iff ab
  54. 0054specialize finite_beta_value_one_iff ac
  55. 0055specialize finite_beta_value_one_iff i
  56. 0056specialize finite_beta_value_one_iff a
  57. 0057apply finite_beta_value_one_iff
  58. 0058exact ha
  59. 0059cases hAe
  60. 0060have hBe : (b = 1 → BetaAt(bb,bc,i,1)) ∧ (BetaAt(bb,bc,i,1) → b = 1)
  61. 0061specialize finite_beta_value_one_iff bb
  62. 0062specialize finite_beta_value_one_iff bc
  63. 0063specialize finite_beta_value_one_iff i
  64. 0064specialize finite_beta_value_one_iff b
  65. 0065apply finite_beta_value_one_iff
  66. 0066exact hb
  67. 0067cases hBe
  68. 0068have hUe : (u = 1 → BetaAt(ub,uc,i,1)) ∧ (BetaAt(ub,uc,i,1) → u = 1)
  69. 0069specialize finite_beta_value_one_iff ub
  70. 0070specialize finite_beta_value_one_iff uc
  71. 0071specialize finite_beta_value_one_iff i
  72. 0072specialize finite_beta_value_one_iff u
  73. 0073apply finite_beta_value_one_iff
  74. 0074exact hu
  75. 0075cases hUe
  76. 0076have hIe : (v = 1 → BetaAt(ib,ic,i,1)) ∧ (BetaAt(ib,ic,i,1) → v = 1)
  77. 0077specialize finite_beta_value_one_iff ib
  78. 0078specialize finite_beta_value_one_iff ic
  79. 0079specialize finite_beta_value_one_iff i
  80. 0080specialize finite_beta_value_one_iff v
  81. 0081apply finite_beta_value_one_iff
  82. 0082exact hv
  83. 0083cases hIe
  84. 0084have hUn : (BetaAt(ub,uc,i,1)BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)) ∧ (BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)BetaAt(ub,uc,i,1))
  85. 0085specialize hUnion i
  86. 0086apply hUnion
  87. 0087exact hi
  88. 0088cases hUn
  89. 0089have hIn : (BetaAt(ib,ic,i,1)BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)) ∧ (BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)BetaAt(ib,ic,i,1))
  90. 0090specialize hInter i
  91. 0091apply hInter
  92. 0092exact hi
  93. 0093cases hIn
  94. 0094specialize finite_bit_union_intersection_values a
  95. 0095specialize finite_bit_union_intersection_values b
  96. 0096specialize finite_bit_union_intersection_values u
  97. 0097specialize finite_bit_union_intersection_values v
  98. 0098apply finite_bit_union_intersection_values
  99. 0099specialize finite_bit_entry_cases ab
  100. 0100specialize finite_bit_entry_cases ac
  101. 0101specialize finite_bit_entry_cases l
  102. 0102specialize finite_bit_entry_cases i
  103. 0103specialize finite_bit_entry_cases a
  104. 0104apply finite_bit_entry_cases
  105. 0105exact hA_right
  106. 0106exact hi
  107. 0107exact ha
  108. 0108specialize finite_bit_entry_cases bb
  109. 0109specialize finite_bit_entry_cases bc
  110. 0110specialize finite_bit_entry_cases l
  111. 0111specialize finite_bit_entry_cases i
  112. 0112specialize finite_bit_entry_cases b
  113. 0113apply finite_bit_entry_cases
  114. 0114exact hB_right
  115. 0115exact hi
  116. 0116exact hb
  117. 0117specialize finite_bit_entry_cases ub
  118. 0118specialize finite_bit_entry_cases uc
  119. 0119specialize finite_bit_entry_cases l
  120. 0120specialize finite_bit_entry_cases i
  121. 0121specialize finite_bit_entry_cases u
  122. 0122apply finite_bit_entry_cases
  123. 0123exact hU_right
  124. 0124exact hi
  125. 0125exact hu
  126. 0126specialize finite_bit_entry_cases ib
  127. 0127specialize finite_bit_entry_cases ic
  128. 0128specialize finite_bit_entry_cases l
  129. 0129specialize finite_bit_entry_cases i
  130. 0130specialize finite_bit_entry_cases v
  131. 0131apply finite_bit_entry_cases
  132. 0132exact hI_right
  133. 0133exact hi
  134. 0134exact hv
  135. 0135split
  136. 0136intro hue
  137. 0137have hab : BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)
  138. 0138apply hUn_left
  139. 0139apply hUe_left
  140. 0140exact hue
  141. 0141cases hab
  142. 0142left
  143. 0143apply hAe_right
  144. 0144exact hab_left
  145. 0145right
  146. 0146apply hBe_right
  147. 0147exact hab_right
  148. 0148intro hab
  149. 0149apply hUe_right
  150. 0150apply hUn_right
  151. 0151cases hab
  152. 0152left
  153. 0153apply hAe_left
  154. 0154exact hab_left
  155. 0155right
  156. 0156apply hBe_left
  157. 0157exact hab_right
  158. 0158split
  159. 0159intro hie
  160. 0160have hab : BetaAt(ab,ac,i,1)BetaAt(bb,bc,i,1)
  161. 0161apply hIn_left
  162. 0162apply hIe_left
  163. 0163exact hie
  164. 0164cases hab
  165. 0165split
  166. 0166apply hAe_right
  167. 0167exact hab_left
  168. 0168apply hBe_right
  169. 0169exact hab_right
  170. 0170intro hab
  171. 0171cases hab
  172. 0172apply hIe_right
  173. 0173apply hIn_right
  174. 0174split
  175. 0175apply hAe_left
  176. 0176exact hab_left
  177. 0177apply hBe_left
  178. 0178exact hab_right