url stringclasses 147 values | commit stringclasses 147 values | file_path stringlengths 7 101 | full_name stringlengths 1 94 | start stringlengths 6 10 | end stringlengths 6 11 | tactic stringlengths 1 11.2k | state_before stringlengths 3 2.09M | state_after stringlengths 6 2.09M | input stringlengths 73 2.09M |
|---|---|---|---|---|---|---|---|---|---|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.exactIterRange_disjoint_of_ne | [97, 1] | [104, 59] | rw [h.mem_exactIterRange_iff] at h1 h2 | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : a ∈ h.exactIterRange m
b : α
h2 : b ∈ h.exactIterRange n
⊢ a ≠ b | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : ∃ b ∈ h.rangeCompl, f^[m] b = a
b : α
h2 : ∃ b_1 ∈ h.rangeCompl, f^[n] b_1 = b
⊢ a ≠ b | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : a ∈ h.exactIterRange m
b : α
h2 : b ∈ h.exactIterRange n
⊢ a ≠ b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.exactIterRange_disjoint_of_ne | [97, 1] | [104, 59] | rcases h1 with ⟨a, h1, rfl⟩ | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : ∃ b ∈ h.rangeCompl, f^[m] b = a
b : α
h2 : ∃ b_1 ∈ h.rangeCompl, f^[n] b_1 = b
⊢ a ≠ b | case intro.intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
b : α
h2 : ∃ b_1 ∈ h.rangeCompl, f^[n] b_1 = b
a : α
h1 : a ∈ h.rangeCompl
⊢ f^[m] a ≠ b | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : ∃ b ∈ h.rangeCompl, f^[m] b = a
b : α
h2 : ∃ b_1 ∈ h.rangeCompl, f^[n] b_1 = b
⊢ a ≠ b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.exactIterRange_disjoint_of_ne | [97, 1] | [104, 59] | rcases h2 with ⟨b, h2, rfl⟩ | case intro.intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
b : α
h2 : ∃ b_1 ∈ h.rangeCompl, f^[n] b_1 = b
a : α
h1 : a ∈ h.rangeCompl
⊢ f^[m] a ≠ b | case intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : a ∈ h.rangeCompl
b : α
h2 : b ∈ h.rangeCompl
⊢ f^[m] a ≠ f^[n] b | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
b : α
h2 : ∃ b_1 ∈ h.rangeCompl, f^[n] b_1 = b
a : α
h1 : a ∈ h.rangeCompl
⊢ f^[m] a ≠ b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.exactIterRange_disjoint_of_ne | [97, 1] | [104, 59] | exact h.iter_apply_ne_of_mem_rangeCompl_iter_ne h0 h1 h2 | case intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : a ∈ h.rangeCompl
b : α
h2 : b ∈ h.rangeCompl
⊢ f^[m] a ≠ f^[n] b | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
m n : ℕ
h0 : m ≠ n
a : α
h1 : a ∈ h.rangeCompl
b : α
h2 : b ∈ h.rangeCompl
⊢ f^[m] a ≠ f^[n] b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_spec | [128, 1] | [139, 23] | rw [iterRangeCompl_zero, coe_empty,
iterate_zero, Set.range_id, Set.compl_univ] | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
⊢ ↑(h.iterRangeCompl 0) = (Set.range f^[0])ᶜ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
⊢ ↑(h.iterRangeCompl 0) = (Set.range f^[0])ᶜ
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_spec | [128, 1] | [139, 23] | rw [h.iterRangeCompl_succ, coe_union, iterRangeCompl_spec n,
h.exactIterRange_spec, Set.diff_eq, Set.inter_union_distrib_right,
Set.union_compl_self, Set.univ_inter, ← Set.compl_inter] | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ ↑(h.iterRangeCompl (n + 1)) = (Set.range f^[n + 1])ᶜ | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ (Set.range f^[n + 1] ∩ Set.range f^[n])ᶜ = (Set.range f^[n + 1])ᶜ | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ ↑(h.iterRangeCompl (n + 1)) = (Set.range f^[n + 1])ᶜ
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_spec | [128, 1] | [139, 23] | refine congr_arg _ (Set.inter_eq_left.mpr λ x h1 ↦ ?_) | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ (Set.range f^[n + 1] ∩ Set.range f^[n])ᶜ = (Set.range f^[n + 1])ᶜ | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
x : α
h1 : x ∈ Set.range f^[n + 1]
⊢ x ∈ Set.range f^[n] | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ (Set.range f^[n + 1] ∩ Set.range f^[n])ᶜ = (Set.range f^[n + 1])ᶜ
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_spec | [128, 1] | [139, 23] | rw [Set.mem_range] at h1 ⊢ | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
x : α
h1 : x ∈ Set.range f^[n + 1]
⊢ x ∈ Set.range f^[n] | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
x : α
h1 : ∃ y, f^[n + 1] y = x
⊢ ∃ y, f^[n] y = x | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
x : α
h1 : x ∈ Set.range f^[n + 1]
⊢ x ∈ Set.range f^[n]
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_spec | [128, 1] | [139, 23] | rcases h1 with ⟨y, rfl⟩ | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
x : α
h1 : ∃ y, f^[n + 1] y = x
⊢ ∃ y, f^[n] y = x | case intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
y : α
⊢ ∃ y_1, f^[n] y_1 = f^[n + 1] y | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
x : α
h1 : ∃ y, f^[n + 1] y = x
⊢ ∃ y, f^[n] y = x
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_spec | [128, 1] | [139, 23] | exact ⟨f y, rfl⟩ | case intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
y : α
⊢ ∃ y_1, f^[n] y_1 = f^[n + 1] y | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
y : α
⊢ ∃ y_1, f^[n] y_1 = f^[n + 1] y
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_card | [162, 1] | [169, 55] | have h0 := card_union_of_disjoint
(h.iterRangeCompl_disjoint_exactIterRange n.le_refl) | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ (h.iterRangeCompl (n + 1)).card = (n + 1) * h.rangeCompl.card | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
h0 : (h.exactIterRange n ∪ h.iterRangeCompl n).card = (h.exactIterRange n).card + (h.iterRangeCompl n).card
⊢ (h.iterRangeCompl (n + 1)).card = (n + 1) * h.rangeCompl.card | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
⊢ (h.iterRangeCompl (n + 1)).card = (n + 1) * h.rangeCompl.card
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iterRangeCompl_card | [162, 1] | [169, 55] | rw [h.iterRangeCompl_succ, h0, h.exactIterRange_card,
iterRangeCompl_card n, Nat.succ_mul, add_comm] | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
h0 : (h.exactIterRange n ∪ h.iterRangeCompl n).card = (h.exactIterRange n).card + (h.iterRangeCompl n).card
⊢ (h.iterRangeCompl (n + 1)).card = (n + 1) * h.rangeCompl.card | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
n : ℕ
h0 : (h.exactIterRange n ∪ h.iterRangeCompl n).card = (h.exactIterRange n).card + (h.iterRangeCompl n).card
⊢ (h.iterRangeCompl (n + 1)).card = (n + 1) * h.rangeCompl.card
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iter_range_of_rangeCompl_singleton | [171, 1] | [175, 78] | rw [h.iterRangeCompl_succ, exactIterRange, h0, image_singleton,
iter_range_of_rangeCompl_singleton h0 n, range_succ, image_insert] | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
a : α
h0 : h.rangeCompl = {a}
n : ℕ
⊢ h.iterRangeCompl (n + 1) = image (fun k => f^[k] a) (range (n + 1)) | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
a : α
h0 : h.rangeCompl = {a}
n : ℕ
⊢ {f^[n] a} ∪ image (fun k => f^[k] a) (range n) = insert (f^[n] a) (image (fun k => f^[k] a) (range n)) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
a : α
h0 : h.rangeCompl = {a}
n : ℕ
⊢ h.iterRangeCompl (n + 1) = image (fun k => f^[k] a) (range (n + 1))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2013/A5/FinChainFn.lean | IMOSL.IMO2013A5.FinChainFn.iter_range_of_rangeCompl_singleton | [171, 1] | [175, 78] | rfl | α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
a : α
h0 : h.rangeCompl = {a}
n : ℕ
⊢ {f^[n] a} ∪ image (fun k => f^[k] a) (range n) = insert (f^[n] a) (image (fun k => f^[k] a) (range n)) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : DecidableEq α
f : α → α
h : FinChainFn f
a : α
h0 : h.rangeCompl = {a}
n : ℕ
⊢ {f^[n] a} ∪ image (fun k => f^[k] a) (range n) = insert (f^[n] a) (image (fun k => f^[k] a) (range n))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/Extra/NatSequence/SeqMax.lean | IMOSL.Extra.exists_map_eq_seqMax | [40, 1] | [46, 70] | rcases le_total (seqMax f n) (f n.succ) with h | h | α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) | case inl
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : seqMax f n ≤ f n.succ
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
case inr
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : f n.succ ≤ seqMax f n
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/Extra/NatSequence/SeqMax.lean | IMOSL.Extra.exists_map_eq_seqMax | [40, 1] | [46, 70] | exact ⟨n + 1, le_refl (n + 1), (max_eq_right h).symm⟩ | case inl
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : seqMax f n ≤ f n.succ
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inl
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : seqMax f n ≤ f n.succ
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/Extra/NatSequence/SeqMax.lean | IMOSL.Extra.exists_map_eq_seqMax | [40, 1] | [46, 70] | rcases exists_map_eq_seqMax n with ⟨k, h0, h1⟩ | case inr
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : f n.succ ≤ seqMax f n
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) | case inr.intro.intro
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : f n.succ ≤ seqMax f n
k : ℕ
h0 : k ≤ n
h1 : f k = seqMax f n
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : f n.succ ≤ seqMax f n
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/Extra/NatSequence/SeqMax.lean | IMOSL.Extra.exists_map_eq_seqMax | [40, 1] | [46, 70] | exact ⟨k, n.le_succ.trans' h0, h1.trans (max_eq_left h).symm⟩ | case inr.intro.intro
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : f n.succ ≤ seqMax f n
k : ℕ
h0 : k ≤ n
h1 : f k = seqMax f n
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.intro.intro
α : Type u_1
inst✝ : LinearOrder α
f : ℕ → α
n : ℕ
h : f n.succ ≤ seqMax f n
k : ℕ
h0 : k ≤ n
h1 : f k = seqMax f n
⊢ ∃ k, k ≤ n + 1 ∧ f k = seqMax f (n + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | have h1 : ∀ t n, n ≤ f^[t] n :=
Nat.rec Nat.le_refl λ t h1 n ↦ (h0 n).trans (h1 _) | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
⊢ f = id | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
⊢ f = id | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
⊢ f = id
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | have h2 : StrictMono f :=
strictMono_nat_of_lt_succ λ n ↦ (h1 _ (f n)).trans_lt (h n) | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
⊢ f = id | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
⊢ f = id | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
⊢ f = id
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | refine funext λ n ↦ (h0 n).antisymm' ?_ | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
⊢ f = id | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
n : ℕ
⊢ f n ≤ n | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
⊢ f = id
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | rw [← Nat.lt_succ_iff, ← h2.lt_iff_lt] | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
n : ℕ
⊢ f n ≤ n | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
n : ℕ
⊢ f (f n) < f n.succ | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
n : ℕ
⊢ f n ≤ n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | exact (h1 _ _).trans_lt (h n) | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
n : ℕ
⊢ f (f n) < f n.succ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
h0 : ∀ (n : ℕ), n ≤ f n
h1 : ∀ (t n : ℕ), n ≤ f^[t] n
h2 : StrictMono f
n : ℕ
⊢ f (f n) < f n.succ
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | suffices ∀ k n : ℕ, k ≤ n → k ≤ f n from λ n ↦ this n n n.le_refl | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
⊢ ∀ (n : ℕ), n ≤ f n | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
⊢ ∀ (k n : ℕ), k ≤ n → k ≤ f n | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
⊢ ∀ (n : ℕ), n ≤ f n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | refine Nat.rec (λ k _ ↦ (f k).zero_le) (λ k h0 n h1 ↦ ?_) | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
⊢ ∀ (k n : ℕ), k ≤ n → k ≤ f n | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n
⊢ k.succ ≤ f n | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
⊢ ∀ (k n : ℕ), k ≤ n → k ≤ f n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | rcases n with _ | n | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n
⊢ k.succ ≤ f n | case zero
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
h1 : k.succ ≤ 0
⊢ k.succ ≤ f 0
case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
⊢ k.succ ≤ f (n + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n
⊢ k.succ ≤ f n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | exact absurd k.succ_pos h1.not_lt | case zero
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
h1 : k.succ ≤ 0
⊢ k.succ ≤ f 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case zero
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
h1 : k.succ ≤ 0
⊢ k.succ ≤ f 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | refine (h n).trans_le' ?_ | case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
⊢ k.succ ≤ f (n + 1) | case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
⊢ k ≤ f^[g n + 2] n | Please generate a tactic in lean4 to solve the state.
STATE:
case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
⊢ k.succ ≤ f (n + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | generalize g n + 2 = t | case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
⊢ k ≤ f^[g n + 2] n | case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
t : ℕ
⊢ k ≤ f^[t] n | Please generate a tactic in lean4 to solve the state.
STATE:
case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
⊢ k ≤ f^[g n + 2] n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.main_step | [28, 1] | [46, 32] | exact t.rec (Nat.succ_le_succ_iff.mp h1)
(λ t h2 ↦ (h0 _ h2).trans_eq (f.iterate_succ_apply' _ _).symm) | case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
t : ℕ
⊢ k ≤ f^[t] n | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case succ
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k < f (k + 1)
k : ℕ
h0 : ∀ (n : ℕ), k ≤ n → k ≤ f n
n : ℕ
h1 : k.succ ≤ n + 1
t : ℕ
⊢ k ≤ f^[t] n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | refine Iff.symm ⟨λ h k ↦ ?_, λ h ↦ ?_⟩ | f g : ℕ → ℕ
⊢ (∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)) ↔ f = id ∧ g = fun x => 0 | case refine_1
f g : ℕ → ℕ
h : f = id ∧ g = fun x => 0
k : ℕ
⊢ f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
case refine_2
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
⊢ f = id ∧ g = fun x => 0 | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
⊢ (∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)) ↔ f = id ∧ g = fun x => 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | rcases h with ⟨rfl, rfl⟩ | case refine_1
f g : ℕ → ℕ
h : f = id ∧ g = fun x => 0
k : ℕ
⊢ f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1) | case refine_1.intro
k : ℕ
⊢ id^[(fun x => 0) k + 2] k + ((fun x => 0)^[id k + 1] k + (fun x => 0) (k + 1)) + 1 = id (k + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_1
f g : ℕ → ℕ
h : f = id ∧ g = fun x => 0
k : ℕ
⊢ f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | rw [iterate_id, iterate_succ_apply'] | case refine_1.intro
k : ℕ
⊢ id^[(fun x => 0) k + 2] k + ((fun x => 0)^[id k + 1] k + (fun x => 0) (k + 1)) + 1 = id (k + 1) | case refine_1.intro
k : ℕ
⊢ id k + (0 + (fun x => 0) (k + 1)) + 1 = id (k + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_1.intro
k : ℕ
⊢ id^[(fun x => 0) k + 2] k + ((fun x => 0)^[id k + 1] k + (fun x => 0) (k + 1)) + 1 = id (k + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | rfl | case refine_1.intro
k : ℕ
⊢ id k + (0 + (fun x => 0) (k + 1)) + 1 = id (k + 1) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_1.intro
k : ℕ
⊢ id k + (0 + (fun x => 0) (k + 1)) + 1 = id (k + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | obtain rfl : f = id := by
refine main_step (g := g) (λ k ↦ ?_)
rw [← h, Nat.lt_succ_iff]
exact Nat.le_add_right _ _ | case refine_2
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
⊢ f = id ∧ g = fun x => 0 | case refine_2
g : ℕ → ℕ
h : ∀ (k : ℕ), id^[g k + 2] k + (g^[id k + 1] k + g (k + 1)) + 1 = id (k + 1)
⊢ id = id ∧ g = fun x => 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
⊢ f = id ∧ g = fun x => 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | refine ⟨rfl, funext λ n ↦ ?_⟩ | case refine_2
g : ℕ → ℕ
h : ∀ (k : ℕ), id^[g k + 2] k + (g^[id k + 1] k + g (k + 1)) + 1 = id (k + 1)
⊢ id = id ∧ g = fun x => 0 | case refine_2
g : ℕ → ℕ
h : ∀ (k : ℕ), id^[g k + 2] k + (g^[id k + 1] k + g (k + 1)) + 1 = id (k + 1)
n : ℕ
⊢ g n = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2
g : ℕ → ℕ
h : ∀ (k : ℕ), id^[g k + 2] k + (g^[id k + 1] k + g (k + 1)) + 1 = id (k + 1)
⊢ id = id ∧ g = fun x => 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | simp_rw [iterate_id, Function.id_def, Nat.succ_inj',
add_right_eq_self, add_eq_zero_iff] at h | case refine_2
g : ℕ → ℕ
h : ∀ (k : ℕ), id^[g k + 2] k + (g^[id k + 1] k + g (k + 1)) + 1 = id (k + 1)
n : ℕ
⊢ g n = 0 | case refine_2
g : ℕ → ℕ
n : ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
⊢ g n = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2
g : ℕ → ℕ
h : ∀ (k : ℕ), id^[g k + 2] k + (g^[id k + 1] k + g (k + 1)) + 1 = id (k + 1)
n : ℕ
⊢ g n = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | rcases n with _ | n | case refine_2
g : ℕ → ℕ
n : ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
⊢ g n = 0 | case refine_2.zero
g : ℕ → ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
⊢ g 0 = 0
case refine_2.succ
g : ℕ → ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
n : ℕ
⊢ g (n + 1) = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2
g : ℕ → ℕ
n : ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
⊢ g n = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | exacts [(h 0).1, (h n).2] | case refine_2.zero
g : ℕ → ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
⊢ g 0 = 0
case refine_2.succ
g : ℕ → ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
n : ℕ
⊢ g (n + 1) = 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case refine_2.zero
g : ℕ → ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
⊢ g 0 = 0
case refine_2.succ
g : ℕ → ℕ
h : ∀ (k : ℕ), g^[k + 1] k = 0 ∧ g (k + 1) = 0
n : ℕ
⊢ g (n + 1) = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | refine main_step (g := g) (λ k ↦ ?_) | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
⊢ f = id | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
k : ℕ
⊢ f^[g k + 2] k < f (k + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
⊢ f = id
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | rw [← h, Nat.lt_succ_iff] | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
k : ℕ
⊢ f^[g k + 2] k < f (k + 1) | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
k : ℕ
⊢ f^[g k + 2] k ≤ f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
k : ℕ
⊢ f^[g k + 2] k < f (k + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution | [49, 1] | [63, 30] | exact Nat.le_add_right _ _ | f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
k : ℕ
⊢ f^[g k + 2] k ≤ f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ → ℕ
h : ∀ (k : ℕ), f^[g k + 2] k + (g^[f k + 1] k + g (k + 1)) + 1 = f (k + 1)
k : ℕ
⊢ f^[g k + 2] k ≤ f^[g k + 2] k + (g^[f k + 1] k + g (k + 1))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.PNat_exists_Nat_conj | [74, 1] | [77, 53] | simp_rw [PNat.succPNat_natPred] | f : ℕ+ → ℕ+
n : ℕ+
⊢ f n = ((fun n => (f n.succPNat).natPred) n.natPred).succPNat | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
f : ℕ+ → ℕ+
n : ℕ+
⊢ f n = ((fun n => (f n.succPNat).natPred) n.natPred).succPNat
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.PNat_eq_Nat_conj_iff | [79, 1] | [82, 80] | rw [h, PNat.succPNat_natPred, PNat.succPNat_natPred] | f : ℕ+ → ℕ+
g : ℕ → ℕ
h : g = fun n => (f n.succPNat).natPred
n : ℕ+
⊢ f n = (g n.natPred).succPNat | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
f : ℕ+ → ℕ+
g : ℕ → ℕ
h : g = fun n => (f n.succPNat).natPred
n : ℕ+
⊢ f n = (g n.natPred).succPNat
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.PNat_Nat_conj_iterate | [84, 1] | [88, 52] | rw [iterate_succ_apply', iterate_succ_apply',
PNat_Nat_conj_iterate f m k] | f : ℕ → ℕ
m : ℕ+
k : ℕ
⊢ (fun n => (f n.natPred).succPNat)^[k + 1] m = (f^[k + 1] m.natPred).succPNat | f : ℕ → ℕ
m : ℕ+
k : ℕ
⊢ (f (f^[k] m.natPred).succPNat.natPred).succPNat = (f (f^[k] m.natPred)).succPNat | Please generate a tactic in lean4 to solve the state.
STATE:
f : ℕ → ℕ
m : ℕ+
k : ℕ
⊢ (fun n => (f n.natPred).succPNat)^[k + 1] m = (f^[k + 1] m.natPred).succPNat
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.PNat_Nat_conj_iterate | [84, 1] | [88, 52] | rfl | f : ℕ → ℕ
m : ℕ+
k : ℕ
⊢ (f (f^[k] m.natPred).succPNat.natPred).succPNat = (f (f^[k] m.natPred)).succPNat | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
f : ℕ → ℕ
m : ℕ+
k : ℕ
⊢ (f (f^[k] m.natPred).succPNat.natPred).succPNat = (f (f^[k] m.natPred)).succPNat
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | obtain ⟨f, rfl⟩ := PNat_exists_Nat_conj f | f g : ℕ+ → ℕ+
⊢ (∀ (n : ℕ+), f^[↑(g n) + 1] n + (g^[↑(f n)] n + g (n + 1)) = f (n + 1) + 1) ↔ f = id ∧ g = fun x => 1 | case intro
g : ℕ+ → ℕ+
f : ℕ → ℕ
⊢ (∀ (n : ℕ+),
(fun n => (f n.natPred).succPNat)^[↑(g n) + 1] n + (g^[↑((fun n => (f n.natPred).succPNat) n)] n + g (n + 1)) =
(fun n => (f n.natPred).succPNat) (n + 1) + 1) ↔
(fun n => (f n.natPred).succPNat) = id ∧ g = fun x => 1 | Please generate a tactic in lean4 to solve the state.
STATE:
f g : ℕ+ → ℕ+
⊢ (∀ (n : ℕ+), f^[↑(g n) + 1] n + (g^[↑(f n)] n + g (n + 1)) = f (n + 1) + 1) ↔ f = id ∧ g = fun x => 1
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | obtain ⟨g, rfl⟩ := PNat_exists_Nat_conj g | case intro
g : ℕ+ → ℕ+
f : ℕ → ℕ
⊢ (∀ (n : ℕ+),
(fun n => (f n.natPred).succPNat)^[↑(g n) + 1] n + (g^[↑((fun n => (f n.natPred).succPNat) n)] n + g (n + 1)) =
(fun n => (f n.natPred).succPNat) (n + 1) + 1) ↔
(fun n => (f n.natPred).succPNat) = id ∧ g = fun x => 1 | case intro.intro
f g : ℕ → ℕ
⊢ (∀ (n : ℕ+),
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n) + 1] n +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n)] n +
(fun n => (g n.natPred).succPNat) (n + 1)) =
(fun n => (f n.natPred).succPNat) (n + 1) + 1) ↔
(fun n => (f n.natPred).succPNat) = id ∧ (fun n => (g n.natPred).succPNat) = fun x => 1 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro
g : ℕ+ → ℕ+
f : ℕ → ℕ
⊢ (∀ (n : ℕ+),
(fun n => (f n.natPred).succPNat)^[↑(g n) + 1] n + (g^[↑((fun n => (f n.natPred).succPNat) n)] n + g (n + 1)) =
(fun n => (f n.natPred).succPNat) (n + 1) + 1) ↔
(fun n => (f n.natPred).succPNat) = id ∧ g = fun x => 1
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | rw [eq_comm, PNat_eq_Nat_conj_iff, eq_comm (b := λ _ ↦ 1),
PNat_eq_Nat_conj_iff, PNat_to_Nat_prop, Iff.comm] | case intro.intro
f g : ℕ → ℕ
⊢ (∀ (n : ℕ+),
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n) + 1] n +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n)] n +
(fun n => (g n.natPred).succPNat) (n + 1)) =
(fun n => (f n.natPred).succPNat) (n + 1) + 1) ↔
(fun n => (f n.natPred).succPNat) = id ∧ (fun n => (g n.natPred).succPNat) = fun x => 1 | case intro.intro
f g : ℕ → ℕ
⊢ ((f = fun n => (id n.succPNat).natPred) ∧ g = fun n => PNat.natPred 1) ↔
∀ (n : ℕ),
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1)) =
(fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
f g : ℕ → ℕ
⊢ (∀ (n : ℕ+),
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n) + 1] n +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n)] n +
(fun n => (g n.natPred).succPNat) (n + 1)) =
(fun n => (f n.natPred).succPNat) (n + 1) + 1) ↔
(fun n => (f n.natPred).succPNat) = id ∧ (fun n => (g n.natPred).succPNat) = fun x => 1
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | refine final_solution.symm.trans <| forall_congr' (λ n ↦ ?_) | case intro.intro
f g : ℕ → ℕ
⊢ ((f = fun n => (id n.succPNat).natPred) ∧ g = fun n => PNat.natPred 1) ↔
∀ (n : ℕ),
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1)) =
(fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1 | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1)) =
(fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
f g : ℕ → ℕ
⊢ ((f = fun n => (id n.succPNat).natPred) ∧ g = fun n => PNat.natPred 1) ↔
∀ (n : ℕ),
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1)) =
(fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | rw [← PNat.coe_inj, PNat_Nat_conj_iterate, PNat_Nat_conj_iterate] | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1)) =
(fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1 | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
↑((f^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat.natPred).succPNat +
((g^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat.natPred).succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1))) =
↑((fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
(fun n => (f n.natPred).succPNat)^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat +
((fun n => (g n.natPred).succPNat)^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1)) =
(fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | simp_rw [Nat.natPred_succPNat, PNat.add_coe, Nat.succPNat_coe, Nat.succ_add] | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
↑((f^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat.natPred).succPNat +
((g^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat.natPred).succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1))) =
↑((fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1) | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
(f^[(g n + 1).succ] n + (g^[(f n).succ] n + (g (n.succPNat + 1).natPred).succ).succ).succ =
(f (n.succPNat + 1).natPred + ↑1).succ | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
↑((f^[↑((fun n => (g n.natPred).succPNat) n.succPNat) + 1] n.succPNat.natPred).succPNat +
((g^[↑((fun n => (f n.natPred).succPNat) n.succPNat)] n.succPNat.natPred).succPNat +
(fun n => (g n.natPred).succPNat) (n.succPNat + 1))) =
↑((fun n => (f n.natPred).succPNat) (n.succPNat + 1) + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | rw [← add_left_inj 2] | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
(f^[(g n + 1).succ] n + (g^[(f n).succ] n + (g (n.succPNat + 1).natPred).succ).succ).succ =
(f (n.succPNat + 1).natPred + ↑1).succ | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 + 2 = f (n + 1) + 2 ↔
(f^[(g n + 1).succ] n + (g^[(f n).succ] n + (g (n.succPNat + 1).natPred).succ).succ).succ =
(f (n.succPNat + 1).natPred + ↑1).succ | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 = f (n + 1) ↔
(f^[(g n + 1).succ] n + (g^[(f n).succ] n + (g (n.succPNat + 1).natPred).succ).succ).succ =
(f (n.succPNat + 1).natPred + ↑1).succ
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2011/A4/A4.lean | IMOSL.IMO2011A4.final_solution_PNat | [91, 1] | [101, 29] | rfl | case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 + 2 = f (n + 1) + 2 ↔
(f^[(g n + 1).succ] n + (g^[(f n).succ] n + (g (n.succPNat + 1).natPred).succ).succ).succ =
(f (n.succPNat + 1).natPred + ↑1).succ | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
f g : ℕ → ℕ
n : ℕ
⊢ f^[g n + 2] n + (g^[f n + 1] n + g (n + 1)) + 1 + 2 = f (n + 1) + 2 ↔
(f^[(g n + 1).succ] n + (g^[(f n).succ] n + (g (n.succPNat + 1).natPred).succ).succ).succ =
(f (n.succPNat + 1).natPred + ↑1).succ
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.Even_iff_bodd | [28, 1] | [30, 59] | rw [Nat.even_iff, Nat.mod_two_of_bodd, Bool.cond_eq_ite,
Nat.one_ne_zero.ite_eq_right_iff, Bool.bool_iff_false] | k : ℕ
⊢ Even k ↔ k.bodd = false | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
k : ℕ
⊢ Even k ↔ k.bodd = false
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.xor_eq_false_iff_eq | [32, 1] | [33, 55] | rw [← Bool.bool_iff_false, Bool.xor_iff_ne, not_not] | a b : Bool
⊢ xor a b = false ↔ a = b | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
a b : Bool
⊢ xor a b = false ↔ a = b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | let f : ℕ → Fin N → Bool := λ a k ↦ (Ω (a.succ + k)).bodd | N : ℕ
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℕ
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | have h : ¬f.Injective := not_injective_infinite_finite f | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ¬Function.Injective f
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | rw [Function.Injective] at h | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ¬Function.Injective f
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ¬∀ ⦃a₁ a₂ : ℕ⦄, f a₁ = f a₂ → a₁ = a₂
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ¬Function.Injective f
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | simp_rw [not_forall] at h | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ¬∀ ⦃a₁ a₂ : ℕ⦄, f a₁ = f a₂ → a₁ = a₂
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ∃ x x_1, ∃ (_ : f x = f x_1), ¬x = x_1
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ¬∀ ⦃a₁ a₂ : ℕ⦄, f a₁ = f a₂ → a₁ = a₂
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | rcases h with ⟨a, b, h, h0⟩ | N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ∃ x x_1, ∃ (_ : f x = f x_1), ¬x = x_1
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
h : ∃ x x_1, ∃ (_ : f x = f x_1), ¬x = x_1
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | refine ⟨a.succ, b.succ, Nat.succ_ne_succ.mpr h0, λ k h1 ↦ ?_⟩ | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k))) | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
⊢ Even (Ω ((a.succ + k) * (b.succ + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
⊢ ∃ a b, a ≠ b ∧ ∀ k < N, Even (Ω ((a + k) * (b + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | have X (c : ℕ) : c.succ + k ≠ 0 := c.succ_add k ▸ (c + k).succ_ne_zero | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
⊢ Even (Ω ((a.succ + k) * (b.succ + k))) | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
X : ∀ (c : ℕ), c.succ + k ≠ 0
⊢ Even (Ω ((a.succ + k) * (b.succ + k))) | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
⊢ Even (Ω ((a.succ + k) * (b.succ + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | rw [Even_iff_bodd, cardFactors_mul (X _) (X _),
Nat.bodd_add, xor_eq_false_iff_eq] | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
X : ∀ (c : ℕ), c.succ + k ≠ 0
⊢ Even (Ω ((a.succ + k) * (b.succ + k))) | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
X : ∀ (c : ℕ), c.succ + k ≠ 0
⊢ (Ω (a.succ + k)).bodd = (Ω (b.succ + k)).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
X : ∀ (c : ℕ), c.succ + k ≠ 0
⊢ Even (Ω ((a.succ + k) * (b.succ + k)))
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part1 | [36, 1] | [48, 28] | exact congr_fun h ⟨k, h1⟩ | case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
X : ∀ (c : ℕ), c.succ + k ≠ 0
⊢ (Ω (a.succ + k)).bodd = (Ω (b.succ + k)).bodd | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro.intro
N : ℕ
f : ℕ → Fin N → Bool := fun a k => (Ω (a.succ + ↑k)).bodd
a b : ℕ
h : f a = f b
h0 : ¬a = b
k : ℕ
h1 : k < N
X : ∀ (c : ℕ), c.succ + k ≠ 0
⊢ (Ω (a.succ + k)).bodd = (Ω (b.succ + k)).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | by_contra h | a : ℕ
⊢ ∃ b, a ≤ b ∧ (Ω b).bodd ≠ (Ω b.succ).bodd | a : ℕ
h : ¬∃ b, a ≤ b ∧ (Ω b).bodd ≠ (Ω b.succ).bodd
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
a : ℕ
⊢ ∃ b, a ≤ b ∧ (Ω b).bodd ≠ (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | rw [not_exists] at h | a : ℕ
h : ¬∃ b, a ≤ b ∧ (Ω b).bodd ≠ (Ω b.succ).bodd
⊢ False | a : ℕ
h : ∀ (x : ℕ), ¬(a ≤ x ∧ (Ω x).bodd ≠ (Ω x.succ).bodd)
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
a : ℕ
h : ¬∃ b, a ≤ b ∧ (Ω b).bodd ≠ (Ω b.succ).bodd
⊢ False
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | simp_rw [not_and, not_not] at h | a : ℕ
h : ∀ (x : ℕ), ¬(a ≤ x ∧ (Ω x).bodd ≠ (Ω x.succ).bodd)
⊢ False | a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
a : ℕ
h : ∀ (x : ℕ), ¬(a ≤ x ∧ (Ω x).bodd ≠ (Ω x.succ).bodd)
⊢ False
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | rcases a.exists_infinite_primes with ⟨p, h0, h1⟩ | a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
⊢ False | case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ False | Please generate a tactic in lean4 to solve the state.
STATE:
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
⊢ False
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | apply absurd (eventually_const_of_map_succ_eq h
p (p * p) h0 (h0.trans (Nat.le_mul_self p))) | case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ False | case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ ¬(Ω p).bodd = (Ω (p * p)).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ False
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | rw [cardFactors_apply_prime h1, ← sq, cardFactors_apply_prime_pow h1] | case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ ¬(Ω p).bodd = (Ω (p * p)).bodd | case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ ¬Nat.bodd 1 = Nat.bodd 2 | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ ¬(Ω p).bodd = (Ω (p * p)).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.exists_lt_omega_bodd_ne_succ | [63, 1] | [71, 10] | trivial | case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ ¬Nat.bodd 1 = Nat.bodd 2 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.intro
a : ℕ
h : ∀ (x : ℕ), a ≤ x → (Ω x).bodd = (Ω x.succ).bodd
p : ℕ
h0 : a ≤ p
h1 : p.Prime
⊢ ¬Nat.bodd 1 = Nat.bodd 2
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | wlog h0 : a ≤ b | a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
⊢ a = b | case inr
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
this : ∀ {a b : ℕ}, (∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))) → a ≤ b → a = b
h0 : ¬a ≤ b
⊢ a = b
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
h0 : a ≤ b
⊢ a = b | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
⊢ a = b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | rw [le_iff_exists_add] at h0 | a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
h0 : a ≤ b
⊢ a = b | a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
h0 : ∃ c, b = a + c
⊢ a = b | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
h0 : a ≤ b
⊢ a = b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | rcases h0 with ⟨_ | c, rfl⟩ | a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
h0 : ∃ c, b = a + c
⊢ a = b | case intro.zero
b : ℕ
h : ∀ (k : ℕ), Even (Ω ((b + k) * (b + k)))
⊢ b = b
case intro.succ
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
⊢ a = a + (c + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
h0 : ∃ c, b = a + c
⊢ a = b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | rfl | case intro.zero
b : ℕ
h : ∀ (k : ℕ), Even (Ω ((b + k) * (b + k)))
⊢ b = b
case intro.succ
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
⊢ a = a + (c + 1) | case intro.succ
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
⊢ a = a + (c + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.zero
b : ℕ
h : ∀ (k : ℕ), Even (Ω ((b + k) * (b + k)))
⊢ b = b
case intro.succ
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
⊢ a = a + (c + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | rcases exists_lt_omega_bodd_ne_succ a.succ with ⟨b, h0, h1⟩ | case intro.succ
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
⊢ a = a + (c + 1) | case intro.succ.intro.intro
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
h1 : (Ω b).bodd ≠ (Ω b.succ).bodd
⊢ a = a + (c + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
⊢ a = a + (c + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | revert h1 | case intro.succ.intro.intro
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
h1 : (Ω b).bodd ≠ (Ω b.succ).bodd
⊢ a = a + (c + 1) | case intro.succ.intro.intro
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
⊢ (Ω b).bodd ≠ (Ω b.succ).bodd → a = a + (c + 1) | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
h1 : (Ω b).bodd ≠ (Ω b.succ).bodd
⊢ a = a + (c + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | apply absurd | case intro.succ.intro.intro
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
⊢ (Ω b).bodd ≠ (Ω b.succ).bodd → a = a + (c + 1) | case intro.succ.intro.intro.h₁
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
⊢ (Ω b).bodd = (Ω b.succ).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
⊢ (Ω b).bodd ≠ (Ω b.succ).bodd → a = a + (c + 1)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | specialize h (a * c + (b - a) * c.succ) | case intro.succ.intro.intro.h₁
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
⊢ (Ω b).bodd = (Ω b.succ).bodd | case intro.succ.intro.intro.h₁
a c b : ℕ
h0 : a.succ ≤ b
h : Even (Ω ((a + (a * c + (b - a) * c.succ)) * (a + (c + 1) + (a * c + (b - a) * c.succ))))
⊢ (Ω b).bodd = (Ω b.succ).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro.h₁
a c : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (a + (c + 1) + k)))
b : ℕ
h0 : a.succ ≤ b
⊢ (Ω b).bodd = (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | rw [Even_iff_bodd, add_right_comm, ← add_assoc, a.add_comm, ← Nat.mul_succ,
← add_mul, Nat.add_sub_of_le (a.le_succ.trans h0), ← Nat.succ_mul] at h | case intro.succ.intro.intro.h₁
a c b : ℕ
h0 : a.succ ≤ b
h : Even (Ω ((a + (a * c + (b - a) * c.succ)) * (a + (c + 1) + (a * c + (b - a) * c.succ))))
⊢ (Ω b).bodd = (Ω b.succ).bodd | case intro.succ.intro.intro.h₁
a c b : ℕ
h0 : a.succ ≤ b
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
⊢ (Ω b).bodd = (Ω b.succ).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro.h₁
a c b : ℕ
h0 : a.succ ≤ b
h : Even (Ω ((a + (a * c + (b - a) * c.succ)) * (a + (c + 1) + (a * c + (b - a) * c.succ))))
⊢ (Ω b).bodd = (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | replace h0 := (Nat.zero_lt_of_lt h0).ne.symm | case intro.succ.intro.intro.h₁
a c b : ℕ
h0 : a.succ ≤ b
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
⊢ (Ω b).bodd = (Ω b.succ).bodd | case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro.h₁
a c b : ℕ
h0 : a.succ ≤ b
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
⊢ (Ω b).bodd = (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | have h1 := b.succ_ne_zero | case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd | case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
h1 : b.succ ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | have h2 := c.succ_ne_zero | case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
h1 : b.succ ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd | case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
h1 : b.succ ≠ 0
h2 : c.succ ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
h1 : b.succ ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | rwa [cardFactors_mul (Nat.mul_ne_zero h0 h2) (Nat.mul_ne_zero h1 h2),
cardFactors_mul h0 h2, cardFactors_mul h1 h2, Nat.bodd_add,
xor_eq_false_iff_eq, Nat.bodd_add, Nat.bodd_add, Bool.xor_right_inj] at h | case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
h1 : b.succ ≠ 0
h2 : c.succ ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case intro.succ.intro.intro.h₁
a c b : ℕ
h : (Ω (b * c.succ * (b.succ * c.succ))).bodd = false
h0 : b ≠ 0
h1 : b.succ ≠ 0
h2 : c.succ ≠ 0
⊢ (Ω b).bodd = (Ω b.succ).bodd
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2009/N2/N2.lean | IMOSL.IMO2009N2.final_solution_part2 | [74, 1] | [89, 78] | exact (this (λ k ↦ Nat.mul_comm _ _ ▸ h k) (Nat.le_of_not_ge h0)).symm | case inr
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
this : ∀ {a b : ℕ}, (∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))) → a ≤ b → a = b
h0 : ¬a ≤ b
⊢ a = b | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
a b : ℕ
h : ∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))
this : ∀ {a b : ℕ}, (∀ (k : ℕ), Even (Ω ((a + k) * (b + k)))) → a ≤ b → a = b
h0 : ¬a ≤ b
⊢ a = b
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2012/A5/A5Defs.lean | IMOSL.IMO2012A5.map_commute_of_commute | [31, 1] | [33, 69] | rw [← h, h0, h, add_comm x] | R : Type u_2
S : Type u_1
inst✝³ : NonAssocSemiring R
inst✝² : Add S
inst✝¹ : Mul S
x y : R
inst✝ : IsCancelAdd S
f : R → S
h : good f
h0 : x * y = y * x
⊢ f x * f y + f (x + y) = f y * f x + f (x + y) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
R : Type u_2
S : Type u_1
inst✝³ : NonAssocSemiring R
inst✝² : Add S
inst✝¹ : Mul S
x y : R
inst✝ : IsCancelAdd S
f : R → S
h : good f
h0 : x * y = y * x
⊢ f x * f y + f (x + y) = f y * f x + f (x + y)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2012/A5/A5Defs.lean | IMOSL.IMO2012A5.ReducedGood.period_imp_zero | [50, 1] | [52, 49] | rw [h, add_zero] | R : Type u_1
S : Type u_2
inst✝⁴ : NonAssocSemiring R
inst✝³ : Add S
inst✝² : Mul S
inst✝¹ : One S
inst✝ : Zero S
c : R
f : R → S
hf : ReducedGood f
h : ∀ (x : R), f (x + c) = f x
x : R
⊢ f (x + c) = f (x + 0) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
R : Type u_1
S : Type u_2
inst✝⁴ : NonAssocSemiring R
inst✝³ : Add S
inst✝² : Mul S
inst✝¹ : One S
inst✝ : Zero S
c : R
f : R → S
hf : ReducedGood f
h : ∀ (x : R), f (x + c) = f x
x : R
⊢ f (x + c) = f (x + 0)
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | have h1 n : N * (f (n + 1) - f n) = f N - f 0 := by
rw [mul_sub, sub_eq_iff_eq_add, ← add_sub_right_comm, eq_sub_iff_add_eq',
← N.mul_zero, h0, zero_add, n.add_comm, ← h0, mul_one] | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
h1 : ∀ (n : ℤ), N * (f (n + 1) - f n) = f N - f 0
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | replace h1 n : f (n + 1) = (f 1 - f 0) + f n :=
eq_add_of_sub_eq <| mul_left_cancel₀ h <| by rw [h1, ← h1 0, zero_add] | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
h1 : ∀ (n : ℤ), N * (f (n + 1) - f n) = f N - f 0
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
h1 : ∀ (n : ℤ), f (n + 1) = f 1 - f 0 + f n
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
h1 : ∀ (n : ℤ), N * (f (n + 1) - f n) = f N - f 0
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | generalize f 1 - f 0 = q at h1 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
h1 : ∀ (n : ℤ), f (n + 1) = f 1 - f 0 + f n
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f (n + 1) = q + f n
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
h1 : ∀ (n : ℤ), f (n + 1) = f 1 - f 0 + f n
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | apply Extra.IntIntLinearSolverAlt at h1 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f (n + 1) = q + f n
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f (n + 1) = q + f n
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | refine (em' (N = q)).imp (λ h2 ↦ ?_) (λ h2 ↦ ⟨f 0, funext <| by rwa [h2]⟩) | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
⊢ f = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
⊢ f = 0 ∨ ∃ c, f = fun x => N * x + c
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | have h3 := h0 0 0 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
⊢ f = 0 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f (N * 0) + N * f 0 = f (f (0 + 0))
⊢ f = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
⊢ f = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | rw [add_zero, N.mul_zero, h1 (f 0), add_comm, add_left_inj,
mul_eq_mul_right_iff, or_iff_right h2] at h3 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f (N * 0) + N * f 0 = f (f (0 + 0))
⊢ f = 0 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
⊢ f = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f (N * 0) + N * f 0 = f (f (0 + 0))
⊢ f = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | specialize h0 0 1 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
⊢ f = 0 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : f (N * 0) + N * f 1 = f (f (0 + 1))
⊢ f = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
⊢ f = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | rw [N.mul_zero, zero_add, h1 (f 1), add_comm, add_left_inj,
mul_eq_mul_right_iff, or_iff_right h2, h1, mul_one, h3, add_zero] at h0 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : f (N * 0) + N * f 1 = f (f (0 + 1))
⊢ f = 0 | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : q = 0
⊢ f = 0 | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : f (N * 0) + N * f 1 = f (f (0 + 1))
⊢ f = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | funext n | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : q = 0
⊢ f = 0 | case h
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : q = 0
n : ℤ
⊢ f n = 0 n | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : q = 0
⊢ f = 0
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | rw [h1, h0, h3, n.zero_mul, add_zero, Pi.zero_apply] | case h
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : q = 0
n : ℤ
⊢ f n = 0 n | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case h
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
q : ℤ
h1 : ∀ (n : ℤ), f n = q * n + f 0
h2 : ¬N = q
h3 : f 0 = 0
h0 : q = 0
n : ℤ
⊢ f n = 0 n
TACTIC:
|
https://github.com/mortarsanjaya/IMOSLLean4.git | be127d301e366822fbeeeda49d9fd5b998fb4eb5 | IMOSLLean4/IMO2019/A1/A1.lean | IMOSL.IMO2019A1.final_solution | [23, 1] | [49, 62] | rw [mul_sub, sub_eq_iff_eq_add, ← add_sub_right_comm, eq_sub_iff_add_eq',
← N.mul_zero, h0, zero_add, n.add_comm, ← h0, mul_one] | N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
n : ℤ
⊢ N * (f (n + 1) - f n) = f N - f 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
N : ℤ
h : N ≠ 0
f : ℤ → ℤ
h0 : ∀ (a b : ℤ), f (N * a) + N * f b = f (f (a + b))
n : ℤ
⊢ N * (f (n + 1) - f n) = f N - f 0
TACTIC:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.