Compfiles/Usa1987P5.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned compfiles documentation, Pinned compfiles corpus index
29 declarations, 0 contain sorry, 0 declared as axioms
USA Mathematical Olympiad 1987, Problem 5
a₁, a₂, ... , aₙ is a sequence of 0s and 1s. T is the number of triples (aᵢ, aⱼ, aₖ) with i < j < k which are not equal to (0, 1, 0) or (1, 0, 1). For 1 ≤ i ≤ n, f(i) is the number of j < i with aⱼ = aᵢ plus the number of j > i with aⱼ ≠ aᵢ. Show that T = f(1)(f(1) - 1)/2 + f(2)(f(2) - 1)/2 + ... + f(n)(f(n) - 1)/2. If n is odd, what is the smallest value of T?
Imports (10)
- Mathlib.Algebra.BigOperators.Ring.Finset
- Mathlib.Algebra.Order.Chebyshev
- Mathlib.Algebra.Order.Ring.Star
- Mathlib.AlgebraicTopology.SimplexCategory.Basic
- Mathlib.Data.Int.ConditionallyCompleteOrder
- Mathlib.Data.Int.Star
- Mathlib.Data.Nat.Choose.Cast
- Mathlib.Tactic.Linarith
- Mathlib.Tactic.Ring
- ProblemExtraction
Imported by 1 file
- def
Usa1987P5.eqBeforeThe set of positionsj < iwitha j = a iline 40 sourceSource documentation
The set of positions
j < iwitha j = a i.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,FinsetProof uses:
Finset.filter,And,LT.lt,Eq,Finset.univ5 instances, coercions and auxiliary constants left out.
def eqBefore (a : Fin n → Bool) (i : Fin n) : Finset (Fin n) := …
- def
Usa1987P5.neqAfterThe set of positionsj > iwitha j ≠ a iline 44 sourceSource documentation
The set of positions
j > iwitha j ≠ a i.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,FinsetProof uses:
Finset.filter,And,LT.lt,Ne,Eq,Finset.univ6 instances, coercions and auxiliary constants left out.
def neqAfter (a : Fin n → Bool) (i : Fin n) : Finset (Fin n) := …
- def
Usa1987P5.fThe quantityf(i)from the problem statement line 48 sourceSource documentation
The quantity
f(i)from the problem statement.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,BoolProof uses:
HAdd.hAdd,Finset.card, Usa1987P5.eqBefore, Usa1987P5.neqAfter2 instances, coercions and auxiliary constants left out.
def f (a : Fin n → Bool) (i : Fin n) : ℕ := (eqBefore a i).card + (neqAfter a i).card
Mentions: Usa1987P5.eqBefore, Usa1987P5.neqAfter
- def
Usa1987P5.numGoodTriplesThe quantityTfrom the problem statement: the number of triples of indicesi < j < kwhose values are not(0, 1, 0)or(1, 0, 1)line 52 sourceSource documentation
The quantity
Tfrom the problem statement: the number of triples of indicesi < j < kwhose values are not(0, 1, 0)or(1, 0, 1).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,BoolProof uses:
Finset.card,Prod,Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Not,Or,Eq,Bool.false,Bool.true,Finset.univ8 instances, coercions and auxiliary constants left out.
def numGoodTriples (a : Fin n → Bool) : ℕ := …
- def
Usa1987P5.altSeqThe alternating sequence0, 1, 0, 1, ...line 59 sourceSource documentation
The alternating sequence
0, 1, 0, 1, ....no axioms what this means
Statement uses:
Nat,Fin,BoolProof uses:
BEq.beq,HMod.hMod,OfNat.ofNat6 instances, coercions and auxiliary constants left out.
def altSeq (n : ℕ) : Fin n → Bool := fun i ↦ (i : ℕ) % 2 == 1
- determine
Usa1987P5.minTline 61 sourceno axioms what this means
Statement uses:
NatProof uses:
HDiv.hDiv,HMul.hMul,HSub.hSub,OfNat.ofNat7 instances, coercions and auxiliary constants left out.
- lemma
Usa1987P5.f_applyline 65 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa1987P5.f,HAdd.hAdd,Finset.card, Usa1987P5.eqBefore, Usa1987P5.neqAfterProof uses:
rfl2 instances, coercions and auxiliary constants left out.
- lemma
Usa1987P5.good_iffA triple of bits is good (not alternating) iff two adjacent values agree line 69 sourceSource documentation
A triple of bits is good (not alternating) iff two adjacent values agree.
no axioms what this means
Statement uses:
Bool,Iff,Not,Or,And,Eq,Bool.false,Bool.trueProof uses:
of_decide_eq_true,id,Decidable.decide,Eq.refl,Eq.symm7 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma good_iff (x y z : Bool) : ¬ ((x = false ∧ y = true ∧ z = false) ∨ (x = true ∧ y = false ∧ z = true)) ↔ x = y ∨ y = z := by … - lemma
Usa1987P5.choose_add_twoVandermonde's identity atk = 2line 75 sourceSource documentation
Vandermonde's identity at
k = 2.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Nat.choose,HAdd.hAdd,OfNat.ofNat,HMul.hMulProof uses:
Rat,Eq.mpr,HDiv.hDiv,HSub.hSub,id,congr,congrArg,Eq.trans,Nat.cast_choose_two,congrFun',Nat.cast_add,Nat.cast_mul,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCast,Rat.rawCast,Int.negOfNat,Mathlib.Meta.NormNum.instAddMonoidWithOne',NNRat.rawCast,Mathlib.Tactic.Ring.Common.div_congrand 57 more73 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma choose_add_two (x y : ℕ) : (x + y).choose 2 = x.choose 2 + y.choose 2 + x * y := by …
- def
Usa1987P5.tripsATriplesi < j < kwitha i = a j = a kline 82 sourceSource documentation
Triples
i < j < kwitha i = a j = a k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Finset,ProdProof uses:
Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Eq,Finset.univ6 instances, coercions and auxiliary constants left out.
def tripsA (a : Fin n → Bool) : Finset (Fin n × Fin n × Fin n) := …
- def
Usa1987P5.tripsBTriplesi < j < kwitha i = a j ≠ a kline 86 sourceSource documentation
Triples
i < j < kwitha i = a j ≠ a k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Finset,ProdProof uses:
Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Eq,Ne,Finset.univ7 instances, coercions and auxiliary constants left out.
def tripsB (a : Fin n → Bool) : Finset (Fin n × Fin n × Fin n) := …
- def
Usa1987P5.tripsCTriplesi < j < kwitha i ≠ a j = a kline 90 sourceSource documentation
Triples
i < j < kwitha i ≠ a j = a k.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Finset,ProdProof uses:
Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Ne,Eq,Finset.univ7 instances, coercions and auxiliary constants left out.
def tripsC (a : Fin n → Bool) : Finset (Fin n × Fin n × Fin n) := …
- lemma
Usa1987P5.numGoodTriples_eqline 93 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa1987P5.numGoodTriples,HAdd.hAdd,Finset.card,Prod, Usa1987P5.tripsA, Usa1987P5.tripsB, Usa1987P5.tripsCProof uses:
Finset,Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Not,Or,Bool.false,Bool.true,Finset.univ,Union.union,Finset.ext,Eq.mpr,Iff,Membership.mem,Ne,id,congr,congrArgand 21 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 44 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.card_tripsAline 133 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.card,Prod, Usa1987P5.tripsA,Finset.sum,Finset.univ,Nat.choose, Usa1987P5.eqBefore,OfNat.ofNatProof uses:
Eq.mpr,Finset.filter,Prod.snd,id,congrArg,Finset.card_eq_sum_card_fiberwise,of_eq_true,Set.MapsTo,Finset,Eq.trans,Set.univ,True,Set,Finset.coe_univ,Finset.sum_congr,rfl,Membership.mem,LT.lt,Prod.fst,SProd.sprodand 22 more30 instances, coercions and auxiliary constants left out.
Tactic trace: 31 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.card_tripsBline 161 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.card,Prod, Usa1987P5.tripsB,Finset.sum,Finset.univ,HMul.hMul, Usa1987P5.eqBefore, Usa1987P5.neqAfterProof uses:
Eq.mpr,Finset.filter,Prod.fst,Prod.snd,id,congrArg,Finset.card_eq_sum_card_fiberwise,of_eq_true,Set.MapsTo,Finset,Eq.trans,Set.univ,True,Set,Finset.coe_univ,Finset.sum_congr,rfl,Membership.mem,SProd.sprod,Eq.symmand 22 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 25 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.card_tripsCline 188 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.card,Prod, Usa1987P5.tripsC,Finset.sum,Finset.univ,Nat.choose, Usa1987P5.neqAfter,OfNat.ofNatProof uses:
Ne,of_decide_eq_true,id,Decidable.decide,Bool.true,Eq.refl,Eq.mpr,Finset.filter,Prod.fst,congrArg,Finset.card_eq_sum_card_fiberwise,of_eq_true,Set.MapsTo,Finset,Eq.trans,Set.univ,True,Set,Finset.coe_univ,Finset.sum_congrand 28 more33 instances, coercions and auxiliary constants left out.
Tactic trace: 27 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.sum_eqBeforeline 215 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.sum,Finset.univ,Finset.card, Usa1987P5.eqBefore,Prod,Finset.filter,And,LT.lt,Prod.fst,Prod.snd,SProd.sprod,FinsetProof uses:
Eq.mpr,id,congrArg,Finset.card_eq_sum_card_fiberwise,of_eq_true,Set.MapsTo,Eq.trans,Set.ofPred,Set.univ,True,congr,Set,Membership.mem,Finset.coe_filter,funext,congrFun',true_and,Finset.coe_univ,Finset.sum_congr,rfland 15 more24 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.sum_neqAfterline 235 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.sum,Finset.univ,Finset.card, Usa1987P5.neqAfter,Prod,Finset.filter,And,LT.lt,Prod.fst,Prod.snd,Ne,SProd.sprod,FinsetProof uses:
Eq.mpr,id,congrArg,Finset.card_eq_sum_card_fiberwise,of_eq_true,Set.MapsTo,Eq.trans,Set.ofPred,Not,Set.univ,True,congr,Set,Membership.mem,Finset.filter_congr,Iff.of_eq,Eq.refl,Finset.coe_filter,funext,congrFun'and 20 more26 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.sum_fThe sum of thefvalues depends only onnline 256 sourceSource documentation
The sum of the
fvalues depends only onn.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq,Finset.sum,Finset.univ, Usa1987P5.f,Nat.choose,Finset.card,OfNat.ofNatProof uses:
HAdd.hAdd, Usa1987P5.eqBefore, Usa1987P5.neqAfter,Eq.mpr,id,congrArg,Eq.symm,Finset.sum_add_distrib,Finset.sum_congr,rfl,Finset,Membership.mem, Usa1987P5.f_apply,Eq.refl,Prod,Finset.filter,And,LT.lt,Prod.fst,Prod.sndand 27 more39 instances, coercions and auxiliary constants left out.
Tactic trace: 25 steps
Open to load the checked before-and-after goal states.
lemma sum_f (a : Fin n → Bool) : ∑ i : Fin n, f a i = (Finset.univ : Finset (Fin n)).card.choose 2 := by …Mentions: Usa1987P5.f
- problem
Usa1987P5.usa1987_p5_part1line 285 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Bool,Eq, Usa1987P5.numGoodTriples,Finset.sum,Finset.univ,Nat.choose, Usa1987P5.f,OfNat.ofNatProof uses:
Eq.mpr,HAdd.hAdd,Finset.card,Prod, Usa1987P5.tripsA, Usa1987P5.tripsB, Usa1987P5.tripsC,id,congrArg, Usa1987P5.numGoodTriples_eq, Usa1987P5.eqBefore, Usa1987P5.card_tripsA,HMul.hMul, Usa1987P5.neqAfter, Usa1987P5.card_tripsB, Usa1987P5.card_tripsC,Eq.symm,Finset.sum_add_distrib,Finset.sum_congr,rfland 24 more31 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.key_divDivisibility:n * (n - 1) * (n - 3) = 8 * (n * C((n-1)/2, 2))forn = 2k + 1line 296 sourceSource documentation
Divisibility:
n * (n - 1) * (n - 3) = 8 * (n * C((n-1)/2, 2))forn = 2k + 1.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMul.hMul,HAdd.hAdd,OfNat.ofNat,HSub.hSub,Nat.chooseProof uses:
Eq.mpr,HDiv.hDiv,id,congrArg,Nat.choose_two_right,Nat.div_two_mul_two_of_even,Nat.even_mul_pred_self,Mathlib.Tactic.Ring.of_eq,HPow.hPow,Nat.rawCast,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.symm,Mathlib.Tactic.Ring.Common.add_mul,Mathlib.Tactic.Ring.Common.mul_add,Mathlib.Tactic.Ring.Common.mul_pf_rightand 13 more38 instances, coercions and auxiliary constants left out.
Tactic trace: 19 steps
Open to load the checked before-and-after goal states.
lemma key_div (k : ℕ) : (2 * k + 1) * ((2 * k + 1) - 1) * ((2 * k + 1) - 3) = 8 * ((2 * k + 1) * k.choose 2) := by … - lemma
Usa1987P5.cast_keyCast of the productn * (n - 1) * (n - 3)to the integers, for oddnline 317 sourceSource documentation
Cast of the product
n * (n - 1) * (n - 3)to the integers, for oddn.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,Int,HMul.hMul,HAdd.hAdd,OfNat.ofNat,HSub.hSubProof uses:
Nat.casesAuxOn,Mathlib.Meta.NormNum.isNat_eq_true,Mathlib.Meta.NormNum.isNat_natCast,Mathlib.Meta.NormNum.isNat_mul,Eq.refl,Mathlib.Meta.NormNum.isNat_add,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Meta.NormNum.isNat_natSub,Mathlib.Meta.NormNum.IsInt.to_isNat,Mathlib.Meta.NormNum.isInt_mul,Int.ofNat,Int.negOfNat,Mathlib.Meta.NormNum.IsNat.to_isInt,Mathlib.Meta.NormNum.isInt_sub,Eq.mpr,id,congrArg,congr,Eq.trans,Nat.cast_muland 41 more71 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma cast_key (k : ℕ) : (((2 * k + 1) * ((2 * k + 1) - 1) * ((2 * k + 1) - 3) : ℕ) : ℤ) = ((2 * k + 1 : ℕ) : ℤ) * (((2 * k + 1 : ℕ) : ℤ) - 1) * (((2 * k + 1 : ℕ) : ℤ) - 3) := by … - lemma
Usa1987P5.lower_boundThe lower bound: every sequence on2k + 1positions has at least(2k + 1) * C(k, 2)good triples line 330 sourceSource documentation
The lower bound: every sequence on
2k + 1positions has at least(2k + 1) * C(k, 2)good triples.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Bool,LE.le,Nat.choose, Usa1987P5.numGoodTriplesProof uses:
Eq,Int,HSub.hSub,Finset.sum,Finset.univ,HPow.hPow, Usa1987P5.f, Usa1987P5.usa1987_p5_part1,Eq.mpr,id,congrArg,Finset.mul_sum,Finset.sum_congr,rfl,Finset,Membership.mem,HDiv.hDiv,Nat.choose_two_right,Nat.div_two_mul_two_of_even,Nat.even_mul_pred_selfand 129 more142 instances, coercions and auxiliary constants left out.
Tactic trace: 52 steps
Open to load the checked before-and-after goal states.
lemma lower_bound (k : ℕ) (a : Fin (2 * k + 1) → Bool) : (2 * k + 1) * k.choose 2 ≤ numGoodTriples a := by …Mentions: Usa1987P5.numGoodTriples
- lemma
Usa1987P5.altSeq_eq_iffline 392 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,Iff,Eq,Bool, Usa1987P5.altSeq,HMod.hMod,OfNat.ofNatProof uses:
LT.lt,Nat.mod_lt,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool.false,id,Eq.mpr,BEq.beq,Bool.true,congrArg,propext,Bool.eq_iff_iff,beq_iff_eq,Iff.intro22 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.card_eqBefore_altline 399 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Eq,Finset.card, Usa1987P5.eqBefore, Usa1987P5.altSeq,HDiv.hDivProof uses:
LT.lt,HMod.hMod,Nat.mod_lt,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.false,Eq.mpr,Finset.range,id,congrArg,Eq.symm,Finset.card_range,Finset.card_bij,Membership.mem,Finset,Iff.mp, Usa1987P5.altSeq_eq_iff,And.rightand 15 more43 instances, coercions and auxiliary constants left out.
Tactic trace: 35 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.card_neqAfter_altline 428 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Eq,Finset.card, Usa1987P5.neqAfter, Usa1987P5.altSeq,HSub.hSub,HDiv.hDivProof uses:
LT.lt,HMod.hMod,Nat.mod_lt,Mathlib.Meta.NormNum.isNat_lt_true,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Bool.false,Eq.mpr,Finset.range,id,congrArg,Eq.symm,Finset.card_range,Finset.card_bij,Membership.mem,Finset,Not,Iff.mp,Iff.notand 18 more48 instances, coercions and auxiliary constants left out.
Tactic trace: 43 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.f_altline 461 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Fin,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Eq, Usa1987P5.f, Usa1987P5.altSeqProof uses:
Eq.mpr,Finset.card, Usa1987P5.eqBefore, Usa1987P5.neqAfter,id,congrArg, Usa1987P5.f_apply,HDiv.hDiv, Usa1987P5.card_eqBefore_alt,HSub.hSub, Usa1987P5.card_neqAfter_alt,LT.lt,Fin.isLt17 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
- lemma
Usa1987P5.T_altThe alternating sequence attains the bound line 467 sourceSource documentation
The alternating sequence attains the bound.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq, Usa1987P5.numGoodTriples,HAdd.hAdd,HMul.hMul,OfNat.ofNat, Usa1987P5.altSeq,Nat.chooseProof uses:
Eq.mpr,Finset.sum,Fin,Finset.univ, Usa1987P5.f,id,congrArg, Usa1987P5.usa1987_p5_part1,Finset.sum_congr,rfl,Finset,Membership.mem, Usa1987P5.f_alt,Eq.refl,HSMul.hSMul,Finset.card,Finset.sum_const,Fintype.card,Finset.card_univ,Fintype.card_finand 1 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma T_alt (k : ℕ) : numGoodTriples (altSeq (2 * k + 1)) = (2 * k + 1) * k.choose 2 := by …
Mentions: Usa1987P5.numGoodTriples, Usa1987P5.altSeq
- problem
Usa1987P5.usa1987_p5_part2line 476 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Odd,IsLeast,Set.range,Fin,Bool, Usa1987P5.numGoodTriples, Usa1987P5.minTProof uses:
Eq,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Nat.choose,HSub.hSub, Usa1987P5.key_div,id,And.intro,Membership.mem,Set,lowerBounds,Exists.intro, Usa1987P5.altSeq,Eq.mpr,congrArg, Usa1987P5.T_alt,Eq.refl,LE.le, Usa1987P5.lower_bound and 1 more26 instances, coercions and auxiliary constants left out.
Tactic trace: 14 steps
Open to load the checked before-and-after goal states.