/-
Copyright 2026 The Formal Conjectures Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-/
module
public import FormalConjecturesUtilMaximality of $k = 43$ with restricted digit counts in bases $3 \le b < k$
Numbers $k$ such that the base $b$ expansion of $k$ for each $b = 3..k-1$ never contains more than two distinct digits.
The sequence Numbers $k$ such that the base $b$ expansion of $k$ for each $b = 3..k-1$ never contains more than two distinct digits.
References:
arxiv/2605.22763 Advancing Mathematics Research with AI-Driven Formal Proof Search by George Tsoukalas et al.
@[expose] public sectionnamespace OeisA306424open List Finset NatNumbers $k$ such that the base $b$ expansion of $k$ for each $b = 3..k-1$ never contains more than two distinct digits.
def Condition (k : ℕ) : Prop :=
-- The bases $b$ range over $3 \le b \le k-1$, expressed as $3 \le b$ and $b < k$.
∀ b : ℕ, 3 ≤ b ∧ b < k → ((Nat.digits b k).toFinset.card) ≤ 2The $n$-th number $k$ such that the base $b$ expansion of $k$ for each $b = 3..k-1$ never contains more than two distinct digits.
noncomputable def a (n : ℕ) : ℕ := n.nth Condition@[category test, AMS 11]
lemma Condition_lt_four {k : ℕ} (hk : k ≤ 3) : Condition k := k:ℕhk:k ≤ 3⊢ Condition k
k:ℕhk:k ≤ 3b:ℕhb1:3 ≤ bhb2:b < k⊢ #(b.digits k).toFinset ≤ 2
All goals completed! 🐙@[category test, AMS 11]
lemma Condition_zero : Condition 0 := Condition_lt_four (⊢ 0 ≤ 3 All goals completed! 🐙)@[category test, AMS 11]
lemma Condition_one : Condition 1 := Condition_lt_four (⊢ 1 ≤ 3 All goals completed! 🐙)@[category test, AMS 11]
lemma Condition_two : Condition 2 := Condition_lt_four (⊢ 2 ≤ 3 All goals completed! 🐙)@[category test, AMS 11]
lemma Condition_three : Condition 3 := Condition_lt_four (⊢ 3 ≤ 3 All goals completed! 🐙)b:ℕhb1:3 ≤ bhb2:b < 4hb:b = 3⊢ #(b.digits 4).toFinset ≤ 2
subst hb hb1:3 ≤ 3hb2:3 < 4⊢ #(digits 3 4).toFinset ≤ 2
decide All goals completed! 🐙@[category test, AMS 11]
lemma Condition_five : Condition 5 := by ⊢ Condition 5
intro b ⟨hb1, hb2⟩ b:ℕhb1:3 ≤ bhb2:b < 5⊢ #(b.digits 5).toFinset ≤ 2
interval_cases b «3» b:ℕhb1:3 ≤ 3hb2:3 < 5⊢ #(digits 3 5).toFinset ≤ 2«4» b:ℕhb1:3 ≤ 4hb2:4 < 5⊢ #(digits 4 5).toFinset ≤ 2
· «3» b:ℕhb1:3 ≤ 3hb2:3 < 5⊢ #(digits 3 5).toFinset ≤ 2 decide All goals completed! 🐙
· «4» b:ℕhb1:3 ≤ 4hb2:4 < 5⊢ #(digits 4 5).toFinset ≤ 2 decide All goals completed! 🐙
@[category test, AMS 11]
lemma a_1 : a 1 = 1 := by ⊢ a 1 = 1
change Nat.nth Condition 1 = 1 ⊢ nth Condition 1 = 1
rw [Nat.nth_eq_sInf ⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1 ⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1] ⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
have h0 : Nat.nth Condition 0 = 0 := Nat.nth_zero_of_zero Condition_zero h0:nth Condition 0 = 0⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
have hmem : 1 ∈ {x | Condition x ∧ ∀ k < 1, Nat.nth Condition k < x} := by ⊢ a 1 = 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
refine ⟨Condition_one, fun k hk => ?_⟩ h0:nth Condition 0 = 0k:ℕhk:k < 1⊢ nth Condition k < 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
interval_cases k «0» h0:nth Condition 0 = 0k:ℕhk:0 < 1⊢ nth Condition 0 < 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
rw [h0 «0» h0:nth Condition 0 = 0k:ℕhk:0 < 1⊢ 0 < 1 «0» h0:nth Condition 0 = 0k:ℕhk:0 < 1⊢ 0 < 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1]«0» h0:nth Condition 0 = 0k:ℕhk:0 < 1⊢ 0 < 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
exact zero_lt_one h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
have h_inf_mem := Nat.sInf_mem ⟨1, hmem⟩ h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
have h_gt_zero := h_inf_mem.2 0 (by h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ 0 < 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:nth Condition 0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1 omega All goals completed! 🐙 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:nth Condition 0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1) h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:nth Condition 0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
rw [h0 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1 h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1] at h_gt_zero h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
have h_le_one : sInf {x | Condition x ∧ ∀ k < 1, Nat.nth Condition k < x} ≤ 1 :=
csInf_le (OrderBot.bddBelow _) hmem h0:nth Condition 0 = 0hmem:1 ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_gt_zero:0 < sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x}h_le_one:sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} ≤ 1⊢ sInf {x | Condition x ∧ ∀ k < 1, nth Condition k < x} = 1
omega All goals completed! 🐙
@[category test, AMS 11]
lemma a_2 : a 2 = 2 := by ⊢ a 2 = 2
change Nat.nth Condition 2 = 2 ⊢ nth Condition 2 = 2
rw [Nat.nth_eq_sInf ⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2 ⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2] ⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
have h0 : Nat.nth Condition 0 = 0 := Nat.nth_zero_of_zero Condition_zero h0:nth Condition 0 = 0⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
have h1 : Nat.nth Condition 1 = 1 := a_1 h0:nth Condition 0 = 0h1:nth Condition 1 = 1⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
have hmem : 2 ∈ {x | Condition x ∧ ∀ k < 2, Nat.nth Condition k < x} := by ⊢ a 2 = 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
refine ⟨Condition_two, fun k hk => ?_⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:k < 2⊢ nth Condition k < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
interval_cases k «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:0 < 2⊢ nth Condition 0 < 2«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:1 < 2⊢ nth Condition 1 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
· «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:0 < 2⊢ nth Condition 0 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2 rw [h0 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:0 < 2⊢ 0 < 2 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:0 < 2⊢ 0 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2]«0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:0 < 2⊢ 0 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2; exact zero_lt_two All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
· «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:1 < 2⊢ nth Condition 1 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2 rw [h1 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:1 < 2⊢ 1 < 2 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:1 < 2⊢ 1 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2]«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1k:ℕhk:1 < 2⊢ 1 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2; exact one_lt_two h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
have h_inf_mem := Nat.sInf_mem ⟨2, hmem⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
have h_gt_one := h_inf_mem.2 1 (by h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ 1 < 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:nth Condition 1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2 omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:nth Condition 1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2) h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:nth Condition 1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
rw [h1 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2] at h_gt_one h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
have h_le_two : sInf {x | Condition x ∧ ∀ k < 2, Nat.nth Condition k < x} ≤ 2 :=
csInf_le (OrderBot.bddBelow _) hmem h0:nth Condition 0 = 0h1:nth Condition 1 = 1hmem:2 ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_gt_one:1 < sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x}h_le_two:sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} ≤ 2⊢ sInf {x | Condition x ∧ ∀ k < 2, nth Condition k < x} = 2
omega All goals completed! 🐙
@[category test, AMS 11]
lemma a_3 : a 3 = 3 := by ⊢ a 3 = 3
change Nat.nth Condition 3 = 3 ⊢ nth Condition 3 = 3
rw [Nat.nth_eq_sInf ⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 ⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3] ⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have h0 : Nat.nth Condition 0 = 0 := Nat.nth_zero_of_zero Condition_zero h0:nth Condition 0 = 0⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have h1 : Nat.nth Condition 1 = 1 := a_1 h0:nth Condition 0 = 0h1:nth Condition 1 = 1⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have h2 : Nat.nth Condition 2 = 2 := a_2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have hmem : 3 ∈ {x | Condition x ∧ ∀ k < 3, Nat.nth Condition k < x} := by ⊢ a 3 = 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
refine ⟨Condition_three, fun k hk => ?_⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:k < 3⊢ nth Condition k < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
interval_cases k «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:0 < 3⊢ nth Condition 0 < 3«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:1 < 3⊢ nth Condition 1 < 3«2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:2 < 3⊢ nth Condition 2 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
· «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:0 < 3⊢ nth Condition 0 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 rw [h0 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:0 < 3⊢ 0 < 3 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:0 < 3⊢ 0 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3]«0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:0 < 3⊢ 0 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
· «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:1 < 3⊢ nth Condition 1 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 rw [h1 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:1 < 3⊢ 1 < 3 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:1 < 3⊢ 1 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3]«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:1 < 3⊢ 1 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
· «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:2 < 3⊢ nth Condition 2 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 rw [h2 «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:2 < 3⊢ 2 < 3 «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:2 < 3⊢ 2 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3]«2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2k:ℕhk:2 < 3⊢ 2 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3; omega h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have h_inf_mem := Nat.sInf_mem ⟨3, hmem⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have h_gt_two := h_inf_mem.2 2 (by h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ 2 < 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:nth Condition 2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:nth Condition 2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3) h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:nth Condition 2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
rw [h2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3] at h_gt_two h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
have h_le_three : sInf {x | Condition x ∧ ∀ k < 3, Nat.nth Condition k < x} ≤ 3 :=
csInf_le (OrderBot.bddBelow _) hmem h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2hmem:3 ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_gt_two:2 < sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x}h_le_three:sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} ≤ 3⊢ sInf {x | Condition x ∧ ∀ k < 3, nth Condition k < x} = 3
omega All goals completed! 🐙
@[category test, AMS 11]
lemma a_4 : a 4 = 4 := by ⊢ a 4 = 4
change Nat.nth Condition 4 = 4 ⊢ nth Condition 4 = 4
rw [Nat.nth_eq_sInf ⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 ⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4] ⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h0 : Nat.nth Condition 0 = 0 := Nat.nth_zero_of_zero Condition_zero h0:nth Condition 0 = 0⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h1 : Nat.nth Condition 1 = 1 := a_1 h0:nth Condition 0 = 0h1:nth Condition 1 = 1⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h2 : Nat.nth Condition 2 = 2 := a_2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h3 : Nat.nth Condition 3 = 3 := a_3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have hmem : 4 ∈ {x | Condition x ∧ ∀ k < 4, Nat.nth Condition k < x} := by ⊢ a 4 = 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
refine ⟨Condition_four, fun k hk => ?_⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:k < 4⊢ nth Condition k < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
interval_cases k «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:0 < 4⊢ nth Condition 0 < 4«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:1 < 4⊢ nth Condition 1 < 4«2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:2 < 4⊢ nth Condition 2 < 4«3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:3 < 4⊢ nth Condition 3 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
· «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:0 < 4⊢ nth Condition 0 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 rw [h0 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:0 < 4⊢ 0 < 4 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:0 < 4⊢ 0 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4]«0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:0 < 4⊢ 0 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
· «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:1 < 4⊢ nth Condition 1 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 rw [h1 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:1 < 4⊢ 1 < 4 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:1 < 4⊢ 1 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4]«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:1 < 4⊢ 1 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
· «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:2 < 4⊢ nth Condition 2 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 rw [h2 «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:2 < 4⊢ 2 < 4 «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:2 < 4⊢ 2 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4]«2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:2 < 4⊢ 2 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
· «3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:3 < 4⊢ nth Condition 3 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 rw [h3 «3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:3 < 4⊢ 3 < 4 «3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:3 < 4⊢ 3 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4]«3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3k:ℕhk:3 < 4⊢ 3 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4; omega h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h_inf_mem := Nat.sInf_mem ⟨4, hmem⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h_gt_three := h_inf_mem.2 3 (by h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ 3 < 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:nth Condition 3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:nth Condition 3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4) h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:nth Condition 3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
rw [h3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4] at h_gt_three h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
have h_le_four : sInf {x | Condition x ∧ ∀ k < 4, Nat.nth Condition k < x} ≤ 4 :=
csInf_le (OrderBot.bddBelow _) hmem h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3hmem:4 ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_gt_three:3 < sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x}h_le_four:sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} ≤ 4⊢ sInf {x | Condition x ∧ ∀ k < 4, nth Condition k < x} = 4
omega All goals completed! 🐙
@[category test, AMS 11]
lemma a_5 : a 5 = 5 := by ⊢ a 5 = 5
change Nat.nth Condition 5 = 5 ⊢ nth Condition 5 = 5
rw [Nat.nth_eq_sInf ⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 ⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5] ⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h0 : Nat.nth Condition 0 = 0 := Nat.nth_zero_of_zero Condition_zero h0:nth Condition 0 = 0⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h1 : Nat.nth Condition 1 = 1 := a_1 h0:nth Condition 0 = 0h1:nth Condition 1 = 1⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h2 : Nat.nth Condition 2 = 2 := a_2 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h3 : Nat.nth Condition 3 = 3 := a_3 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h4 : Nat.nth Condition 4 = 4 := a_4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have hmem : 5 ∈ {x | Condition x ∧ ∀ k < 5, Nat.nth Condition k < x} := by ⊢ a 5 = 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
refine ⟨Condition_five, fun k hk => ?_⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:k < 5⊢ nth Condition k < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
interval_cases k «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:0 < 5⊢ nth Condition 0 < 5«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:1 < 5⊢ nth Condition 1 < 5«2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:2 < 5⊢ nth Condition 2 < 5«3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:3 < 5⊢ nth Condition 3 < 5«4» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:4 < 5⊢ nth Condition 4 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
· «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:0 < 5⊢ nth Condition 0 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 rw [h0 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:0 < 5⊢ 0 < 5 «0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:0 < 5⊢ 0 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5]«0» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:0 < 5⊢ 0 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
· «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:1 < 5⊢ nth Condition 1 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 rw [h1 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:1 < 5⊢ 1 < 5 «1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:1 < 5⊢ 1 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5]«1» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:1 < 5⊢ 1 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
· «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:2 < 5⊢ nth Condition 2 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 rw [h2 «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:2 < 5⊢ 2 < 5 «2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:2 < 5⊢ 2 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5]«2» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:2 < 5⊢ 2 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
· «3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:3 < 5⊢ nth Condition 3 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 rw [h3 «3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:3 < 5⊢ 3 < 5 «3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:3 < 5⊢ 3 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5]«3» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:3 < 5⊢ 3 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5; omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
· «4» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:4 < 5⊢ nth Condition 4 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 rw [h4 «4» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:4 < 5⊢ 4 < 5 «4» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:4 < 5⊢ 4 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5]«4» h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4k:ℕhk:4 < 5⊢ 4 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5; omega h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h_inf_mem := Nat.sInf_mem ⟨5, hmem⟩ h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h_gt_four := h_inf_mem.2 4 (by h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ 4 < 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:nth Condition 4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 omega All goals completed! 🐙 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:nth Condition 4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5) h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:nth Condition 4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
rw [h4 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5 h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5] at h_gt_four h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
have h_le_five : sInf {x | Condition x ∧ ∀ k < 5, Nat.nth Condition k < x} ≤ 5 :=
csInf_le (OrderBot.bddBelow _) hmem h0:nth Condition 0 = 0h1:nth Condition 1 = 1h2:nth Condition 2 = 2h3:nth Condition 3 = 3h4:nth Condition 4 = 4hmem:5 ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_inf_mem:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ∈ {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_gt_four:4 < sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x}h_le_five:sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} ≤ 5⊢ sInf {x | Condition x ∧ ∀ k < 5, nth Condition k < x} = 5
omega All goals completed! 🐙Conjecture: The sequence is finite, with 43 being the last term.
A formal proof has been found with the methods described in arxiv/2605.22763.
@[category research solved, AMS 11, formal_proof using formal_conjectures at
"https://github.com/mo271/formal-conjectures/blob/a32396489dcb8f86c3549b93aa358ac6a10a3a1f/FormalConjectures/OEIS/306424.wip.lean#L276"]
theorem forty_three_is_max : Condition 43 ∧ ∀ k : ℕ, 43 < k → ¬Condition k := by ⊢ Condition 43 ∧ ∀ (k : ℕ), 43 < k → ¬Condition k
sorry All goals completed! 🐙end OeisA306424