FormalConjecturesForMathlib/Combinatorics/AP/Basic.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 project documentation, Formal Conjectures paper, arXiv v1
36 declarations, 0 contain sorry, 0 declared as axioms
Arithmetic Progressions
Main definitions:
Set.IsAPOfLengthWith (s : Set α) (l : ℕ∞) (a d : α): predicate asserting thatsis the set consisting of an arithmetic progression of lengthl(possibly infinite) with first termaand differenced. Useful for cases in which additional conditions need to be applied to the individual terms and/or difference.Set.IsAPOfLength (s : Set α) (l : ℕ∞): predicate asserting thatsis the set consisting of an arithmetic progression of lengthl, for some some first term and difference.
Imports (4)
Imported by 2 files
- def
Set.IsAPOfLengthWithDocumented declaration: IsAPOfLengthWith line 44 sourceSource documentation
A set $S$ is an arithmetic progression of length $l$ with first term $a$ and difference $d$ if $S = \{a, a + d, ..., a + (l - 1)d\}$, if $l$ if finite, else $S = {a, a + d, a + 2d, ...}. This can be written as
s.IsAPOfLengthWith l a d, wherel : ℕ∞may take the infinite value⊤.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENatProof uses:
And,Eq,ENat.card,Set.ofPred,Exists,Nat,LT.lt,HAdd.hAdd,HSMul.hSMul12 instances, coercions and auxiliary constants left out.
def Set.IsAPOfLengthWith (s : Set α) (l : ℕ∞) (a d : α) : Prop := …
- def
List.IsAPOfLengthWithA list version ofSet.IsAPOfLengthWithline 51 sourceSource documentation
A list version of
Set.IsAPOfLengthWith. Useful when order preservation is required, for example when considering images under arbitrary functions.no axioms what this means
Statement uses:
AddCommMonoid,List,NatProof uses:
Or,Eq,List.map,HAdd.hAdd,HSMul.hSMul,List.range,List.reverse8 instances, coercions and auxiliary constants left out.
def List.IsAPOfLengthWith (s : List α) (l : ℕ) (a d : α) : Prop := …
- theorem
Set.IsAPOfLengthWith.cardline 58 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENat, Set.IsAPOfLengthWith,Eq,ENat.cardProof uses:
And.left,Set.ofPred,Exists,Nat,LT.lt,HAdd.hAdd,HSMul.hSMul13 instances, coercions and auxiliary constants left out.
- theorem
Set.IsAPOfLengthWith.eqline 59 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENat, Set.IsAPOfLengthWith,Eq,Set.ofPred,Exists,Nat,LT.lt,HAdd.hAdd,HSMul.hSMulProof uses:
And.right,ENat.card23 instances, coercions and auxiliary constants left out.
- theorem
Set.IsAPOfLengthWith.zeroAn arithmetic progression with first termaand differencedis of length zero if and only ifsis empty line 64 sourceSource documentation
An arithmetic progression with first term
aand differencedis of length zero if and only ifsis empty.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,Iff, Set.IsAPOfLengthWith,OfNat.ofNat,ENat,Eq,EmptyCollection.emptyCollectionProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,And,ENat.card,Set.ofPred,Exists,Nat,LT.lt,HAdd.hAdd,HSMul.hSMul,congr,False,funext,propext,exists_prop_congr,Iff.of_eq,Eq.refland 2 more39 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem zero : s.IsAPOfLengthWith 0 a d ↔ s = ∅ := by simp [IsAPOfLengthWith] …
Mentions: Set.IsAPOfLengthWith
- theorem
Set.IsAPOfLengthWith.oneAn arithmetic progression with first termaand differencedis of length one if and only ifsis a singleton line 69 sourceSource documentation
An arithmetic progression with first term
aand differencedis of length one if and only ifsis a singleton.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,Iff, Set.IsAPOfLengthWith,OfNat.ofNat,ENat,Eq,Singleton.singletonProof uses:
of_eq_true,Eq.trans,Set.encard,True,And,congrFun',congrArg,Set.ofPred,Exists,Nat,LT.lt,HAdd.hAdd,HSMul.hSMul,funext,propext,exists_prop_congr,Iff.of_eq,Eq.refl,zero_nsmul,add_zeroand 5 more43 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem one : s.IsAPOfLengthWith 1 a d ↔ s = {a} := by simp +contextual [IsAPOfLengthWith] …Mentions: Set.IsAPOfLengthWith
- theorem
List.IsAPOfLengthWith.lengthline 77 sourcestandard axioms: propext what this means
Statement uses:
AddCommMonoid,List,Nat, List.IsAPOfLengthWith,Eq,List.lengthProof uses:
List.map,HAdd.hAdd,HSMul.hSMul,List.range,List.reverse,Or,Or.inl,of_eq_true,Eq.trans,True,congrFun',congrArg,List.length_map,List.length_range,eq_self,Or.inr,id,Eq.mp,List.map_reverse,List.length_reverseand 1 more9 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
List.IsAPOfLengthWith.zeroAn arithmetic progression with first termaand differencedis of length zero if and only ifsis empty line 83 sourceSource documentation
An arithmetic progression with first term
aand differencedis of length zero if and only ifsis empty.standard axioms: propext what this means
Statement uses:
AddCommMonoid,List,Iff, List.IsAPOfLengthWith,OfNat.ofNat,Nat,Eq,List.nilProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Or,List.map,HAdd.hAdd,HSMul.hSMul,List.range,List.reverse,congr,List.map_nil,or_self,iff_self10 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem zero : s.IsAPOfLengthWith 0 a d ↔ s = [] := by …
- theorem
List.IsAPOfLengthWith.oneAn arithmetic progression with first termaand differencedis of length one if and only ifsis a singleton line 89 sourceSource documentation
An arithmetic progression with first term
aand differencedis of length one if and only ifsis a singleton.standard axioms: propext what this means
Statement uses:
AddCommMonoid,List,Iff, List.IsAPOfLengthWith,OfNat.ofNat,Nat,Eq,List.cons,List.nilProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Or,List.map,HAdd.hAdd,HSMul.hSMul,List.range,List.reverse,congr,List.map_cons,zero_nsmul,add_zero,List.map_nil,List.reverse_cons,or_self,iff_self14 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem one : s.IsAPOfLengthWith 1 a d ↔ s = [a] := by …
- theorem
Set.isAPOfLengthWith_pairIn an abelian additive groupα, the set{a, b}witha ≠ bis an arithmetic progression of length2with first termaand differenceb - aline 96 sourceSource documentation
In an abelian additive group
α, the set{a, b}witha ≠ bis an arithmetic progression of length2with first termaand differenceb - a.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,AddCommGroup,Ne, Set.IsAPOfLengthWith,Insert.insert,Set,Singleton.singleton,OfNat.ofNat,ENat,Nat,HSub.hSubProof uses:
Eq.mpr,And,Eq,Finset.card,Finset,Set.ofPred,Exists,LE.le,HAdd.hAdd,HSMul.hSMul,id,congr,ENat.card,LT.lt,congrArg,congrFun',Eq.trans,Fintype.card,ENat.card_eq_coe_fintype_card,Fintype.ofFinsetand 43 more102 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
theorem Set.isAPOfLengthWith_pair {α : Type*} [DecidableEq α] [AddCommGroup α] {a b : α} (hab : a ≠ b) : Set.IsAPOfLengthWith {a, b} 2 a (b - a) := by …Mentions: Set.IsAPOfLengthWith
- theorem
Nat.isAPOfLengthWith_pairThe set{a, b} : Set ℕwitha < bis an arithmetic progression of length2with first termaand differenceb - aline 111 sourceSource documentation
The set
{a, b} : Set ℕwitha < bis an arithmetic progression of length2with first termaand differenceb - a.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt, Set.IsAPOfLengthWith,Insert.insert,Set,Singleton.singleton,OfNat.ofNat,ENat,HSub.hSubProof uses:
Exists,Eq,HAdd.hAdd,Nat.exists_eq_add_of_lt,Eq.mpr,Set.ofPred,And,LE.le,HMul.hMul,id,Eq.trans,ENat.card,HSMul.hSMul,True,congr,congrArg,congrFun',Fintype.card,add_assoc,ENat.card_eq_coe_fintype_cardand 40 more135 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
theorem Nat.isAPOfLengthWith_pair {a b : ℕ} (hab : a < b) : Set.IsAPOfLengthWith {a, b} 2 a (b - a) := by …Mentions: Set.IsAPOfLengthWith
- def
Set.IsAPOfLengthThe predicate that a setsis an arithmetic progression of lengthl(possibly infinite) line 122 sourceSource documentation
The predicate that a set
sis an arithmetic progression of lengthl(possibly infinite). This predicate does not assert a specific value for the first term or the difference of the arithmetic progression.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENatProof uses:
Exists, Set.IsAPOfLengthWithdef Set.IsAPOfLength (s : Set α) (l : ℕ∞) : Prop := …
- def
List.IsAPOfLengthA list version ofSet.IsAPOfLengthline 129 sourceSource documentation
A list version of
Set.IsAPOfLength. Useful when order preservation is required, for example when considering images under arbitrary functions.no axioms what this means
Statement uses:
AddCommMonoid,List,NatProof uses:
Exists, List.IsAPOfLengthWithdef List.IsAPOfLength (s : List α) (l : ℕ) : Prop := …
- theorem
Set.IsAPOfLength.cardline 138 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENat, Set.IsAPOfLength,Eq,ENat.cardProof uses:
And.left,Set.ofPred,Exists,Nat,LT.lt,HAdd.hAdd,Exists.choose, Set.IsAPOfLengthWith,HSMul.hSMul,Exists.choose_spec13 instances, coercions and auxiliary constants left out.
- theorem
Set.IsAPOfLength.eqline 140 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENat, Set.IsAPOfLength,Exists,Eq,Set.ofPred,Nat,LT.lt,HAdd.hAdd,HSMul.hSMulProof uses:
Exists.intro,Exists.choose, Set.IsAPOfLengthWith,Exists.choose_spec,And.right,ENat.card23 instances, coercions and auxiliary constants left out.
- theorem
Set.IsAPOfLength.zeroOnly the empty set is a finite arithmetic progression of length $0$ line 144 sourceSource documentation
Only the empty set is a finite arithmetic progression of length $0$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,Iff, Set.IsAPOfLength,OfNat.ofNat,ENat,Eq,EmptyCollection.emptyCollectionProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Exists, Set.IsAPOfLengthWith,funext,iff_self19 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
@[simp] theorem zero : s.IsAPOfLength 0 ↔ s = ∅ := by simp [Set.IsAPOfLength]
Mentions: Set.IsAPOfLength
- theorem
Set.IsAPOfLength.oneOnly singletons are finite arithmetic progressions of length $1$ line 147 sourceSource documentation
Only singletons are finite arithmetic progressions of length $1$.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,Iff, Set.IsAPOfLength,OfNat.ofNat,ENat,Exists,Eq,Singleton.singletonProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg, Set.IsAPOfLengthWith,funext,iff_self15 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
@[simp] theorem one : s.IsAPOfLength 1 ↔ ∃ a, s = {a} := by simp [IsAPOfLength]Mentions: Set.IsAPOfLength
- theorem
Set.IsAPOfLength.congrIf a set is an arithmetic progression of lengthsl₁andl₂, then the lengths are equal line 151 sourceSource documentation
If a set is an arithmetic progression of lengths
l₁andl₂, then the lengths are equal.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENat, Set.IsAPOfLength,EqProof uses:
Eq.mpr,ENat.card,id,congrArg,Eq.symm, Set.IsAPOfLength.card,Eq.refl1 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem congr {s : Set α} {l₁ l₂ : ℕ∞} (h₁ : s.IsAPOfLength l₁) (h₂ : s.IsAPOfLength l₂) : l₁ = l₂ := by … - theorem
List.IsAPOfLength.lengthline 164 sourcestandard axioms: propext what this means
Statement uses:
AddCommMonoid,List,Nat, List.IsAPOfLength,Eq,List.lengthProof uses:
Exists, List.IsAPOfLengthWith, List.IsAPOfLengthWith.length1 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- theorem
List.IsAPOfLength.zeroOnly the empty list is a finite arithmetic progression of length $0$ line 169 sourceSource documentation
Only the empty list is a finite arithmetic progression of length $0$.
standard axioms: Quot.sound, propext what this means
Statement uses:
AddCommMonoid,List,Iff, List.IsAPOfLength,OfNat.ofNat,Nat,Eq,List.nilProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg,Exists, List.IsAPOfLengthWith,funext,iff_self9 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
@[simp] theorem zero : s.IsAPOfLength 0 ↔ s = [] := by simp [IsAPOfLength]
Mentions: List.IsAPOfLength
- theorem
List.IsAPOfLength.oneOnly singletons are finite arithmetic progressions of length $1$ line 172 sourceSource documentation
Only singletons are finite arithmetic progressions of length $1$.
standard axioms: Quot.sound, propext what this means
Statement uses:
AddCommMonoid,List,Iff, List.IsAPOfLength,OfNat.ofNat,Nat,Exists,Eq,List.cons,List.nilProof uses:
of_eq_true,Eq.trans,True,congrFun',congrArg, List.IsAPOfLengthWith,funext,iff_self9 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
@[simp] theorem one : s.IsAPOfLength 1 ↔ ∃ a, s = [a] := by simp [IsAPOfLength]
Mentions: List.IsAPOfLength
- theorem
List.IsAPOfLength.congrIf a list is an arithmetic progression of lengthsl₁andl₂, then the lengths are equal line 176 sourceSource documentation
If a list is an arithmetic progression of lengths
l₁andl₂, then the lengths are equal.standard axioms: propext what this means
Statement uses:
AddCommMonoid,List,Nat, List.IsAPOfLength,EqProof uses:
Eq.mpr,List.length,id,congrArg,Eq.symm, List.IsAPOfLength.length,Eq.reflTactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem congr {s : List α} {l₁ l₂ : ℕ} (h₁ : s.IsAPOfLength l₁) (h₂ : s.IsAPOfLength l₂) : l₁ = l₂ := by … - theorem
Set.isAPOfLength_pairline 183 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
DecidableEq,AddCommGroup,Ne, Set.IsAPOfLength,Insert.insert,Set,Singleton.singleton,OfNat.ofNat,ENat,NatProof uses:
Exists.intro,Exists, Set.IsAPOfLengthWith,HSub.hSub, Set.isAPOfLengthWith_pair20 instances, coercions and auxiliary constants left out.
- theorem
Nat.isAPOfLength_pairline 187 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt, Set.IsAPOfLength,Insert.insert,Set,Singleton.singleton,OfNat.ofNat,ENatProof uses:
Exists.intro,Exists, Set.IsAPOfLengthWith,HSub.hSub, Nat.isAPOfLengthWith_pair20 instances, coercions and auxiliary constants left out.
- theorem
Set.not_isAPOfLength_emptyThe empty set is not an arithmetic progression of positive length line 192 sourceSource documentation
The empty set is not an arithmetic progression of positive length.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,ENat,LT.lt,OfNat.ofNat,Not, Set.IsAPOfLength,EmptyCollection.emptyCollection,SetProof uses:
False.elim,False,Eq.mp,Eq.trans,congrArg, Set.IsAPOfLength.congr,Iff.mpr,Eq, Set.IsAPOfLength.zero,rfl16 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem Set.not_isAPOfLength_empty {l : ℕ∞} (hl : 0 < l) : ¬Set.IsAPOfLength (∅ : Set α) l := …Mentions: Set.IsAPOfLength
- def
Set.IsAPOfLengthFreeWe say that a setsis free of arithmetic progressions of lengthlifscontains no non-trivial arithmetic progressions of lengthlline 198 sourceSource documentation
We say that a set
sis free of arithmetic progressions of lengthlifscontains no non-trivial arithmetic progressions of lengthl. Written asSet.IsAPOfLengthFree s l. -standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENatProof uses:
LE.le, Set.IsAPOfLength,OfNat.ofNat5 instances, coercions and auxiliary constants left out.
def Set.IsAPOfLengthFree (s : Set α) (l : ℕ∞) : Prop := …
- theorem
Set.isAPOfLengthFree_oneAny set is free of arithmetic progressions of length1, because such APs are all trivial line 202 sourceSource documentation
Any set is free of arithmetic progressions of length
1, because such APs are all trivial.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set, Set.IsAPOfLengthFree,OfNat.ofNat,ENatProof uses:
of_eq_true,LE.le, Set.IsAPOfLength,Eq.trans,True,forall_congr,implies_congr,Eq.refl,Exists,Eq,Singleton.singleton,implies_true13 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem Set.isAPOfLengthFree_one (s : Set α) : s.IsAPOfLengthFree 1 := by …
- theorem
Set.isAPOfLengthFree_zeroAny set is free of arithmetic progressions of length0, because such APs are all trivial line 206 sourceSource documentation
Any set is free of arithmetic progressions of length
0, because such APs are all trivial.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set, Set.IsAPOfLengthFree,OfNat.ofNat,ENatProof uses:
of_eq_true,LE.le, Set.IsAPOfLength,Eq.trans,True,forall_congr,implies_congr,Eq.refl,Eq,EmptyCollection.emptyCollection,implies_true22 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem Set.isAPOfLengthFree_zero (s : Set α) : s.IsAPOfLengthFree 0 := by …
- theorem
Set.IsAPOfLength.not_isAPOfLengthFreeAny non-trivial arithmetic progression cannot be free of arithmetic progressions line 210 sourceSource documentation
Any non-trivial arithmetic progression cannot be free of arithmetic progressions.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,ENat, Set.IsAPOfLength,LT.lt,OfNat.ofNat,Not, Set.IsAPOfLengthFreeProof uses:
Eq.mpr,Exists,And,LE.le,id,Eq,Eq.trans,congrArg,funext,Exists.intro,And.intro,le_rfl22 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
theorem Set.IsAPOfLength.not_isAPOfLengthFree {s : Set α} {l : ℕ∞} (hs : s.IsAPOfLength l) (hl : 1 < l) : ¬s.IsAPOfLengthFree l := by … - def
Set.IsAPOfLengthFree.maxCardDefine the largest possible size of a subset of $\{1, \dots, N\}$ that does not contain any non-trivial $k$-term arithmetic progression line 218 sourceSource documentation
Define the largest possible size of a subset of $\{1, \dots, N\}$ that does not contain any non-trivial $k$-term arithmetic progression.
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
SupSet.sSup,Set.ofPred,Exists,Finset,LE.le,Finset.Icc,OfNat.ofNat, Set.IsAPOfLengthFree,ENat,Eq,Finset.card12 instances, coercions and auxiliary constants left out.
noncomputable def Set.IsAPOfLengthFree.maxCard (k : ℕ) (N : ℕ) : ℕ := …
- theorem
Set.IsAPOfLengthFree.maxCard_zeroline 221 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq, Set.IsAPOfLengthFree.maxCard,OfNat.ofNatProof uses:
Eq.mpr,SupSet.sSup,Set.ofPred,Exists,Finset,And,LE.le,Finset.Icc,Finset.card,id,congrFun',congrArg,Set, Set.IsAPOfLengthFree,ENat,funext,Eq.trans,propext,exists_prop_congr,Iff.of_eqand 12 more34 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
- theorem
Set.IsAPOfLengthFree.maxCard_oneline 228 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq, Set.IsAPOfLengthFree.maxCard,OfNat.ofNatProof uses:
Eq.mpr,id,congrArg,Eq.symm, Set.IsAPOfLengthFree.maxCard_zero,of_eq_true,Eq.trans,SupSet.sSup,Set.ofPred,Exists,Finset,And,LE.le,Finset.Icc,Finset.card,True,congr,Set, Set.IsAPOfLengthFree,ENatand 8 more27 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
- def
Set.ContainsAPA setAcontains an arithmetic progression of lengthkwith differencedline 233 sourceSource documentation
A set
Acontains an arithmetic progression of lengthkwith differenced.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Set,NatProof uses:
Exists,And,LE.le, Set.IsAPOfLengthWith,ENat3 instances, coercions and auxiliary constants left out.
def Set.ContainsAP (A : Set α) (k : ℕ) (d : α) : Prop := …
- def
ContainsMonoAPofLengthline 236 sourcestandard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Finite,Set,NatProof uses:
Exists,And, Set.IsAPOfLength,Set.image,Membership.mem,ENat,Eq6 instances, coercions and auxiliary constants left out.
- def
HasMonotoneAPA functionf : β → αhas a monotonek-term arithmetic progression if there exists a choice of indices `b 1 < b 2 < line 246 sourceSource documentation
A function
f : β → αhas a monotonek-term arithmetic progression if there exists a choice of indicesb 1 < b 2 < ... < b ksuch that the subsequencef (b i)forms an increasing or decreasing arithmetic progression of lengthk.no axioms what this means
Statement uses:
AddCommMonoid,Preorder,NatProof uses:
Exists,List,And, List.IsAPOfLength,List.map,List.Pairwise,LT.lt1 instances, coercions and auxiliary constants left out.
def HasMonotoneAP {β : Type*} [Preorder β] (f : β → α) (k : ℕ) : Prop := … - def
Finset.maxAPFreeCardDefine the largest possible size of a subset of a finsetsthat does not contain any non-trivialk-term arithmetic progression line 253 sourceSource documentation
Define the largest possible size of a subset of a finset
sthat does not contain any non-trivialk-term arithmetic progression.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
AddCommMonoid,Nat,FinsetProof uses:
Finset.sup,Finset.filter, Set.IsAPOfLengthFree,ENat,Classical.propDecidable,Finset.powerset,Finset.card7 instances, coercions and auxiliary constants left out.
noncomputable def Finset.maxAPFreeCard (k : ℕ) (s : Finset α) : ℕ := …