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/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elfToString_roundtrip
[2357, 1]
[2370, 59]
. simp only [List.mem_map', forall_exists_index, and_imp, forall_apply_eq_imp_iff₂] intro a _ apply Int.not_newline_mem_reprΔ
case hx elf : List ℤ h : ¬elf = [] ⊢ ∀ (l : List Char), l ∈ List.map Int.reprΔ elf → ¬Char.ofNat 10 ∈ l case hls elf : List ℤ h : ¬elf = [] ⊢ List.map Int.reprΔ elf ≠ []
case hls elf : List ℤ h : ¬elf = [] ⊢ List.map Int.reprΔ elf ≠ []
Please generate a tactic in lean4 to solve the state. STATE: case hx elf : List ℤ h : ¬elf = [] ⊢ ∀ (l : List Char), l ∈ List.map Int.reprΔ elf → ¬Char.ofNat 10 ∈ l case hls elf : List ℤ h : ¬elf = [] ⊢ List.map Int.reprΔ elf ≠ [] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elfToString_roundtrip
[2357, 1]
[2370, 59]
. simp only [ne_eq, List.map_eq_nil, h, not_false_iff]
case hls elf : List ℤ h : ¬elf = [] ⊢ List.map Int.reprΔ elf ≠ []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case hls elf : List ℤ h : ¬elf = [] ⊢ List.map Int.reprΔ elf ≠ [] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
induction elves with | nil => simp only | cons hd tail ih => unfold elvesToString stringToElves cases tail with | nil => simp only [beq_iff_eq, List.map, List.intercalate_singleton, ite_false, List.append_eq_nil, and_false] rw [List.splitOnList_nonmatching, List.map_singleton, stringToElf_ignoresTrailing, elfToString_roundtrip] intro contr cases List.isInfix_append_split_left contr with | inl h₁ => apply double_newline_not_isInfix_stringToElf hd h₁ | inr h₂ => simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero] at h₂ have newline_in_elf := List.isInfix_take_of_isInfix_append h₂ simp only [List.take, List.length_nil, zero_add, ge_iff_le, List.lastN_one_eq_getLast,List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_def] at newline_in_elf apply newline_not_last_elfToString _ newline_in_elf | cons mid tl => simp only [beq_iff_eq, List.map, List.map_eq_nil, IsEmpty.forall_iff, List.join, ite_false, List.append_eq_nil, and_false, List.intercalate] rw [List.append_assoc, List.append_assoc, ← List.append_assoc, List.splitOnList_progress, List.map_append, List.map_singleton, elfToString_roundtrip, List.singleton_append, ←ih, stringToElves, elvesToString, List.intercalate] . simp only [List.map_eq_nil, beq_iff_eq, List.map, ite_false, List.append_eq_nil, and_false] . simp only [List.dropLast] intro contr cases List.isInfix_append_split_left contr with | inl h₃ => apply double_newline_not_isInfix_stringToElf hd apply h₃ | inr h₄ => simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero, List.length_nil] at h₄ have last_contains := List.isInfix_take_of_isInfix_append h₄ simp only [List.take, ge_iff_le, List.lastN_one_eq_getLast, List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_iff] at last_contains apply newline_not_last_elfToString _ last_contains
elves : List (List ℤ) ⊢ stringToElves (elvesToString elves) = elves
no goals
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) ⊢ stringToElves (elvesToString elves) = elves TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only
case nil ⊢ stringToElves (elvesToString []) = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil ⊢ stringToElves (elvesToString []) = [] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
unfold elvesToString stringToElves
case cons hd : List ℤ tail : List (List ℤ) ih : stringToElves (elvesToString tail) = tail ⊢ stringToElves (elvesToString (hd :: tail)) = hd :: tail
case cons hd : List ℤ tail : List (List ℤ) ih : stringToElves (elvesToString tail) = tail ⊢ (if ((if (hd :: tail == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: tail)) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (hd :: tail == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: tail)) ++ [Char.ofNat 10]))) = hd :: tail
Please generate a tactic in lean4 to solve the state. STATE: case cons hd : List ℤ tail : List (List ℤ) ih : stringToElves (elvesToString tail) = tail ⊢ stringToElves (elvesToString (hd :: tail)) = hd :: tail TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
cases tail with | nil => simp only [beq_iff_eq, List.map, List.intercalate_singleton, ite_false, List.append_eq_nil, and_false] rw [List.splitOnList_nonmatching, List.map_singleton, stringToElf_ignoresTrailing, elfToString_roundtrip] intro contr cases List.isInfix_append_split_left contr with | inl h₁ => apply double_newline_not_isInfix_stringToElf hd h₁ | inr h₂ => simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero] at h₂ have newline_in_elf := List.isInfix_take_of_isInfix_append h₂ simp only [List.take, List.length_nil, zero_add, ge_iff_le, List.lastN_one_eq_getLast,List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_def] at newline_in_elf apply newline_not_last_elfToString _ newline_in_elf | cons mid tl => simp only [beq_iff_eq, List.map, List.map_eq_nil, IsEmpty.forall_iff, List.join, ite_false, List.append_eq_nil, and_false, List.intercalate] rw [List.append_assoc, List.append_assoc, ← List.append_assoc, List.splitOnList_progress, List.map_append, List.map_singleton, elfToString_roundtrip, List.singleton_append, ←ih, stringToElves, elvesToString, List.intercalate] . simp only [List.map_eq_nil, beq_iff_eq, List.map, ite_false, List.append_eq_nil, and_false] . simp only [List.dropLast] intro contr cases List.isInfix_append_split_left contr with | inl h₃ => apply double_newline_not_isInfix_stringToElf hd apply h₃ | inr h₄ => simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero, List.length_nil] at h₄ have last_contains := List.isInfix_take_of_isInfix_append h₄ simp only [List.take, ge_iff_le, List.lastN_one_eq_getLast, List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_iff] at last_contains apply newline_not_last_elfToString _ last_contains
case cons hd : List ℤ tail : List (List ℤ) ih : stringToElves (elvesToString tail) = tail ⊢ (if ((if (hd :: tail == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: tail)) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (hd :: tail == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: tail)) ++ [Char.ofNat 10]))) = hd :: tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons hd : List ℤ tail : List (List ℤ) ih : stringToElves (elvesToString tail) = tail ⊢ (if ((if (hd :: tail == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: tail)) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (hd :: tail == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: tail)) ++ [Char.ofNat 10]))) = hd :: tail TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only [beq_iff_eq, List.map, List.intercalate_singleton, ite_false, List.append_eq_nil, and_false]
case cons.nil hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ (if ((if ([hd] == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString [hd]) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if ([hd] == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString [hd]) ++ [Char.ofNat 10]))) = [hd]
case cons.nil hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (elfToString hd ++ [Char.ofNat 10])) = [hd]
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ (if ((if ([hd] == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString [hd]) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if ([hd] == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString [hd]) ++ [Char.ofNat 10]))) = [hd] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
rw [List.splitOnList_nonmatching, List.map_singleton, stringToElf_ignoresTrailing, elfToString_roundtrip]
case cons.nil hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (elfToString hd ++ [Char.ofNat 10])) = [hd]
case cons.nil.h₁ hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10]
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (elfToString hd ++ [Char.ofNat 10])) = [hd] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
intro contr
case cons.nil.h₁ hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10]
case cons.nil.h₁ hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁ hd : List ℤ ih : stringToElves (elvesToString []) = [] ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
cases List.isInfix_append_split_left contr with | inl h₁ => apply double_newline_not_isInfix_stringToElf hd h₁ | inr h₂ => simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero] at h₂ have newline_in_elf := List.isInfix_take_of_isInfix_append h₂ simp only [List.take, List.length_nil, zero_add, ge_iff_le, List.lastN_one_eq_getLast,List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_def] at newline_in_elf apply newline_not_last_elfToString _ newline_in_elf
case cons.nil.h₁ hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁ hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
apply double_newline_not_isInfix_stringToElf hd h₁
case cons.nil.h₁.inl hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₁ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁.inl hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₁ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero] at h₂
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [Char.ofNat 10, Char.ofNat 10] - 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [Char.ofNat 10, Char.ofNat 10] - 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
have newline_in_elf := List.isInfix_take_of_isInfix_append h₂
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] newline_in_elf : List.take (List.length [Char.ofNat 10, Char.ofNat 10] - List.length [Char.ofNat 10]) [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only [List.take, List.length_nil, zero_add, ge_iff_le, List.lastN_one_eq_getLast,List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_def] at newline_in_elf
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] newline_in_elf : List.take (List.length [Char.ofNat 10, Char.ofNat 10] - List.length [Char.ofNat 10]) [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ⊢ False
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] newline_in_elf : List.getLast? (elfToString hd) = some (Char.ofNat 10) ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] newline_in_elf : List.take (List.length [Char.ofNat 10, Char.ofNat 10] - List.length [Char.ofNat 10]) [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
apply newline_not_last_elfToString _ newline_in_elf
case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] newline_in_elf : List.getLast? (elfToString hd) = some (Char.ofNat 10) ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil.h₁.inr hd : List ℤ ih : stringToElves (elvesToString []) = [] contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₂ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [] + 1) (elfToString hd) ++ [Char.ofNat 10] newline_in_elf : List.getLast? (elfToString hd) = some (Char.ofNat 10) ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only [beq_iff_eq, List.map, List.map_eq_nil, IsEmpty.forall_iff, List.join, ite_false, List.append_eq_nil, and_false, List.intercalate]
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ (if ((if (hd :: mid :: tl == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: mid :: tl)) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (hd :: mid :: tl == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: mid :: tl)) ++ [Char.ofNat 10]))) = hd :: mid :: tl
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (elfToString hd ++ ([Char.ofNat 10, Char.ofNat 10] ++ List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (elfToString mid :: List.map elfToString tl))) ++ [Char.ofNat 10])) = hd :: mid :: tl
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ (if ((if (hd :: mid :: tl == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: mid :: tl)) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (hd :: mid :: tl == []) = true then [] else List.intercalate [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (hd :: mid :: tl)) ++ [Char.ofNat 10]))) = hd :: mid :: tl TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
rw [List.append_assoc, List.append_assoc, ← List.append_assoc, List.splitOnList_progress, List.map_append, List.map_singleton, elfToString_roundtrip, List.singleton_append, ←ih, stringToElves, elvesToString, List.intercalate]
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (elfToString hd ++ ([Char.ofNat 10, Char.ofNat 10] ++ List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (elfToString mid :: List.map elfToString tl))) ++ [Char.ofNat 10])) = hd :: mid :: tl
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ hd :: List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (elfToString mid :: List.map elfToString tl)) ++ [Char.ofNat 10])) = hd :: if ((if (mid :: tl == []) = true then [] else List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (mid :: tl))) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (mid :: tl == []) = true then [] else List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (mid :: tl))) ++ [Char.ofNat 10])) case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ List.dropLast [Char.ofNat 10, Char.ofNat 10]
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (elfToString hd ++ ([Char.ofNat 10, Char.ofNat 10] ++ List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (elfToString mid :: List.map elfToString tl))) ++ [Char.ofNat 10])) = hd :: mid :: tl TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
. simp only [List.map_eq_nil, beq_iff_eq, List.map, ite_false, List.append_eq_nil, and_false]
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ hd :: List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (elfToString mid :: List.map elfToString tl)) ++ [Char.ofNat 10])) = hd :: if ((if (mid :: tl == []) = true then [] else List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (mid :: tl))) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (mid :: tl == []) = true then [] else List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (mid :: tl))) ++ [Char.ofNat 10])) case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ List.dropLast [Char.ofNat 10, Char.ofNat 10]
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ List.dropLast [Char.ofNat 10, Char.ofNat 10]
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ hd :: List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (elfToString mid :: List.map elfToString tl)) ++ [Char.ofNat 10])) = hd :: if ((if (mid :: tl == []) = true then [] else List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (mid :: tl))) ++ [Char.ofNat 10]) == []) = true then [] else List.map stringToElf (List.splitOnList [Char.ofNat 10, Char.ofNat 10] (if (mid :: tl == []) = true then [] else List.join (List.intersperse [Char.ofNat 10, Char.ofNat 10] (List.map elfToString (mid :: tl))) ++ [Char.ofNat 10])) case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ List.dropLast [Char.ofNat 10, Char.ofNat 10] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
. simp only [List.dropLast] intro contr cases List.isInfix_append_split_left contr with | inl h₃ => apply double_newline_not_isInfix_stringToElf hd apply h₃ | inr h₄ => simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero, List.length_nil] at h₄ have last_contains := List.isInfix_take_of_isInfix_append h₄ simp only [List.take, ge_iff_le, List.lastN_one_eq_getLast, List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_iff] at last_contains apply newline_not_last_elfToString _ last_contains
case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ List.dropLast [Char.ofNat 10, Char.ofNat 10]
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl ⊢ ¬[Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ List.dropLast [Char.ofNat 10, Char.ofNat 10] TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
apply double_newline_not_isInfix_stringToElf hd
case cons.cons.inl hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₃ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ False
case cons.cons.inl hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₃ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inl hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₃ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
apply h₃
case cons.cons.inl hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₃ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inl hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₃ : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ⊢ [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only [List.length_cons, List.length_singleton, ge_iff_le, Nat.succ_sub_succ_eq_sub, tsub_zero, List.length_nil] at h₄
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [Char.ofNat 10, Char.ofNat 10] - 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN (List.length [Char.ofNat 10, Char.ofNat 10] - 1) (elfToString hd) ++ [Char.ofNat 10] ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
have last_contains := List.isInfix_take_of_isInfix_append h₄
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] ⊢ False
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] last_contains : List.take (List.length [Char.ofNat 10, Char.ofNat 10] - List.length [Char.ofNat 10]) [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
simp only [List.take, ge_iff_le, List.lastN_one_eq_getLast, List.singleton_isInfix_iff_mem, Option.mem_toList, Option.mem_iff] at last_contains
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] last_contains : List.take (List.length [Char.ofNat 10, Char.ofNat 10] - List.length [Char.ofNat 10]) [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ⊢ False
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] last_contains : List.getLast? (elfToString hd) = some (Char.ofNat 10) ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] last_contains : List.take (List.length [Char.ofNat 10, Char.ofNat 10] - List.length [Char.ofNat 10]) [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
elves_roundtrip
[2372, 1]
[2406, 61]
apply newline_not_last_elfToString _ last_contains
case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] last_contains : List.getLast? (elfToString hd) = some (Char.ofNat 10) ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.inr hd mid : List ℤ tl : List (List ℤ) ih : stringToElves (elvesToString (mid :: tl)) = mid :: tl contr : [Char.ofNat 10, Char.ofNat 10] <:+: elfToString hd ++ [Char.ofNat 10] h₄ : [Char.ofNat 10, Char.ofNat 10] <:+: List.lastN 1 (elfToString hd) ++ [Char.ofNat 10] last_contains : List.getLast? (elfToString hd) = some (Char.ofNat 10) ⊢ False TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
unfold isSolutionModel
⊢ isSolutionModel solveOneModel
⊢ ∀ (elves : List (List ℤ)) (elf : List ℤ), elf ∈ elves → solveOneModel elves ≥ List.sum elf
Please generate a tactic in lean4 to solve the state. STATE: ⊢ isSolutionModel solveOneModel TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
intro elves elf elfin
⊢ ∀ (elves : List (List ℤ)) (elf : List ℤ), elf ∈ elves → solveOneModel elves ≥ List.sum elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ solveOneModel elves ≥ List.sum elf
Please generate a tactic in lean4 to solve the state. STATE: ⊢ ∀ (elves : List (List ℤ)) (elf : List ℤ), elf ∈ elves → solveOneModel elves ≥ List.sum elf TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
unfold solveOneModel
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ solveOneModel elves ≥ List.sum elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ solveOneModel elves ≥ List.sum elf TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
have hsumin: List.sum elf ∈ (List.map List.sum) elves := by apply List.mem_map'.2; exists elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
have z:= List.le_maximum_of_mem' hsumin
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
apply WithBot.coe_le_coe.1
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ ↑(List.sum elf) ≤ ↑(WithBot.unbot' 0 (List.maximum (List.map List.sum elves)))
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ WithBot.unbot' 0 (List.maximum (List.map List.sum elves)) ≥ List.sum elf TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
apply le_trans z
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ ↑(List.sum elf) ≤ ↑(WithBot.unbot' 0 (List.maximum (List.map List.sum elves)))
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ List.maximum (List.map List.sum elves) ≤ ↑(WithBot.unbot' 0 (List.maximum (List.map List.sum elves)))
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ ↑(List.sum elf) ≤ ↑(WithBot.unbot' 0 (List.maximum (List.map List.sum elves))) TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
apply WithBot.le_coe_unbot'
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ List.maximum (List.map List.sum elves) ≤ ↑(WithBot.unbot' 0 (List.maximum (List.map List.sum elves)))
no goals
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves hsumin : List.sum elf ∈ List.map List.sum elves z : ↑(List.sum elf) ≤ List.maximum (List.map List.sum elves) ⊢ List.maximum (List.map List.sum elves) ≤ ↑(WithBot.unbot' 0 (List.maximum (List.map List.sum elves))) TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
apply List.mem_map'.2
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ List.sum elf ∈ List.map List.sum elves
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ ∃ a, a ∈ elves ∧ List.sum a = List.sum elf
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ List.sum elf ∈ List.map List.sum elves TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolutionModel_solveOneModel
[2422, 1]
[2430, 30]
exists elf
elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ ∃ a, a ∈ elves ∧ List.sum a = List.sum elf
no goals
Please generate a tactic in lean4 to solve the state. STATE: elves : List (List ℤ) elf : List ℤ elfin : elf ∈ elves ⊢ ∃ a, a ∈ elves ∧ List.sum a = List.sum elf TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolution_solveOne
[2432, 1]
[2434, 71]
unfold isSolution solveOne
⊢ isSolution solveOne
⊢ isSolutionModel ((fun input => solveOneModel (stringToElves input)) ∘ elvesToString)
Please generate a tactic in lean4 to solve the state. STATE: ⊢ isSolution solveOne TACTIC:
https://github.com/jeremysalwen/advent_of_lean_2022.git
96035d07c4f9f133fe79fe02cdf5792b597881c0
One.lean
isSolution_solveOne
[2432, 1]
[2434, 71]
simp [Function.comp, isSolutionModel_solveOneModel, elves_roundtrip]
⊢ isSolutionModel ((fun input => solveOneModel (stringToElves input)) ∘ elvesToString)
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊢ isSolutionModel ((fun input => solveOneModel (stringToElves input)) ∘ elvesToString) TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
refine ⟨?_, ?_⟩
t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1
case refine_1 t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1 case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
{ use 3380*t^2 + 416*t + 13 ring }
case refine_1 t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1 case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1
case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1 case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
{ use 1300*t^2 + 160*t + 5 ring }
case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
use 3380*t^2 + 416*t + 13
case refine_1 t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1
case refine_1 t : ℕ ⊢ 4 * (65 * t + 4) ^ 2 + 1 = 5 * (3380 * t ^ 2 + 416 * t + 13)
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 t : ℕ ⊢ 5 ∣ 4 * (65 * t + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
ring
case refine_1 t : ℕ ⊢ 4 * (65 * t + 4) ^ 2 + 1 = 5 * (3380 * t ^ 2 + 416 * t + 13)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 t : ℕ ⊢ 4 * (65 * t + 4) ^ 2 + 1 = 5 * (3380 * t ^ 2 + 416 * t + 13) TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
use 1300*t^2 + 160*t + 5
case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1
case refine_2 t : ℕ ⊢ 4 * (65 * t + 4) ^ 2 + 1 = 13 * (1300 * t ^ 2 + 160 * t + 5)
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 t : ℕ ⊢ 13 ∣ 4 * (65 * t + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
divides_of_cong_four
[32, 1]
[38, 11]
ring
case refine_2 t : ℕ ⊢ 4 * (65 * t + 4) ^ 2 + 1 = 13 * (1300 * t ^ 2 + 160 * t + 5)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 t : ℕ ⊢ 4 * (65 * t + 4) ^ 2 + 1 = 13 * (1300 * t ^ 2 + 160 * t + 5) TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
intro N
⊢ ∀ (N : ℕ), ∃ n, n > N ∧ 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1
N : ℕ ⊢ ∃ n, n > N ∧ 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
use 65 * N + 4
N : ℕ ⊢ ∃ n, n > N ∧ 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1
N : ℕ ⊢ 65 * N + 4 > N ∧ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: N : ℕ ⊢ ∃ n, n > N ∧ 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
refine ⟨?_, ?_⟩
N : ℕ ⊢ 65 * N + 4 > N ∧ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
case refine_1 N : ℕ ⊢ 65 * N + 4 > N case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: N : ℕ ⊢ 65 * N + 4 > N ∧ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
{ linarith }
case refine_1 N : ℕ ⊢ 65 * N + 4 > N case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 N : ℕ ⊢ 65 * N + 4 > N case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
{ apply divides_of_cong_four }
case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
linarith
case refine_1 N : ℕ ⊢ 65 * N + 4 > N
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 N : ℕ ⊢ 65 * N + 4 > N TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
arb_large_soln
[41, 1]
[47, 33]
apply divides_of_cong_four
case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 N : ℕ ⊢ 5 ∣ 4 * (65 * N + 4) ^ 2 + 1 ∧ 13 ∣ 4 * (65 * N + 4) ^ 2 + 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
refine ⟨?_, ?_⟩
S : Set ℕ ⊢ Set.Infinite S ↔ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S
case refine_1 S : Set ℕ ⊢ Set.Infinite S → ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S
Please generate a tactic in lean4 to solve the state. STATE: S : Set ℕ ⊢ Set.Infinite S ↔ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
{ intro h have h2 := Set.Infinite.exists_nat_lt h intro n rcases h2 n with ⟨m, hm, h3⟩ use m exact ⟨h3, hm⟩ }
case refine_1 S : Set ℕ ⊢ Set.Infinite S → ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S
case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 S : Set ℕ ⊢ Set.Infinite S → ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
{ contrapose! intro h rw [Set.not_infinite] at h let S2 : Finset ℕ := Set.Finite.toFinset h have h2 : ∃ B, ∀n ∈ S2, n ≤ B { use Finset.sup S2 id intro n hn apply Finset.le_sup hn } cases' h2 with N hN use N have h3 : ∀n : ℕ, n ∈ S ↔ n ∈ S2 := by intro n exact (Set.Finite.mem_toFinset h).symm intros n hn h4 rw [h3] at h4 specialize hN n h4 linarith }
case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
intro h
case refine_1 S : Set ℕ ⊢ Set.Infinite S → ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S
case refine_1 S : Set ℕ h : Set.Infinite S ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 S : Set ℕ ⊢ Set.Infinite S → ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
have h2 := Set.Infinite.exists_nat_lt h
case refine_1 S : Set ℕ h : Set.Infinite S ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S
case refine_1 S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 S : Set ℕ h : Set.Infinite S ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
intro n
case refine_1 S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S
case refine_1 S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n : ℕ ⊢ ∃ n_1, n_1 > n ∧ n_1 ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
rcases h2 n with ⟨m, hm, h3⟩
case refine_1 S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n : ℕ ⊢ ∃ n_1, n_1 > n ∧ n_1 ∈ S
case refine_1.intro.intro S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n m : ℕ hm : m ∈ S h3 : n < m ⊢ ∃ n_1, n_1 > n ∧ n_1 ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_1 S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n : ℕ ⊢ ∃ n_1, n_1 > n ∧ n_1 ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
use m
case refine_1.intro.intro S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n m : ℕ hm : m ∈ S h3 : n < m ⊢ ∃ n_1, n_1 > n ∧ n_1 ∈ S
case refine_1.intro.intro S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n m : ℕ hm : m ∈ S h3 : n < m ⊢ m > n ∧ m ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_1.intro.intro S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n m : ℕ hm : m ∈ S h3 : n < m ⊢ ∃ n_1, n_1 > n ∧ n_1 ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
exact ⟨h3, hm⟩
case refine_1.intro.intro S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n m : ℕ hm : m ∈ S h3 : n < m ⊢ m > n ∧ m ∈ S
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_1.intro.intro S : Set ℕ h : Set.Infinite S h2 : ∀ (n : ℕ), ∃ m, m ∈ S ∧ n < m n m : ℕ hm : m ∈ S h3 : n < m ⊢ m > n ∧ m ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
contrapose!
case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S
case refine_2 S : Set ℕ ⊢ ¬Set.Infinite S → ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ ⊢ (∀ (N : ℕ), ∃ n, n > N ∧ n ∈ S) → Set.Infinite S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
intro h
case refine_2 S : Set ℕ ⊢ ¬Set.Infinite S → ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2 S : Set ℕ h : ¬Set.Infinite S ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ ⊢ ¬Set.Infinite S → ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
rw [Set.not_infinite] at h
case refine_2 S : Set ℕ h : ¬Set.Infinite S ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2 S : Set ℕ h : Set.Finite S ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ h : ¬Set.Infinite S ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
let S2 : Finset ℕ := Set.Finite.toFinset h
case refine_2 S : Set ℕ h : Set.Finite S ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ h : Set.Finite S ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
have h2 : ∃ B, ∀n ∈ S2, n ≤ B
case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h h2 : ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
{ use Finset.sup S2 id intro n hn apply Finset.le_sup hn }
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h h2 : ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h h2 : ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h h2 : ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
cases' h2 with N hN
case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h h2 : ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h h2 : ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
use N
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∃ N, ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
have h3 : ∀n : ℕ, n ∈ S ↔ n ∈ S2 := by intro n exact (Set.Finite.mem_toFinset h).symm
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 ⊢ ∀ (n : ℕ), n > N → ¬n ∈ S
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
intros n hn h4
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 ⊢ ∀ (n : ℕ), n > N → ¬n ∈ S
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 ⊢ ∀ (n : ℕ), n > N → ¬n ∈ S TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
rw [h3] at h4
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S ⊢ False
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S2 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S ⊢ False TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
specialize hN n h4
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S2 ⊢ False
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S2 hN : n ≤ N ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S2 ⊢ False TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
linarith
case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S2 hN : n ≤ N ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refine_2.intro S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ h3 : ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 n : ℕ hn : n > N h4 : n ∈ S2 hN : n ≤ N ⊢ False TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
use Finset.sup S2 id
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∀ (n : ℕ), n ∈ S2 → n ≤ Finset.sup S2 id
Please generate a tactic in lean4 to solve the state. STATE: case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∃ B, ∀ (n : ℕ), n ∈ S2 → n ≤ B TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
intro n hn
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∀ (n : ℕ), n ∈ S2 → n ≤ Finset.sup S2 id
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h n : ℕ hn : n ∈ S2 ⊢ n ≤ Finset.sup S2 id
Please generate a tactic in lean4 to solve the state. STATE: case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h ⊢ ∀ (n : ℕ), n ∈ S2 → n ≤ Finset.sup S2 id TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
apply Finset.le_sup hn
case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h n : ℕ hn : n ∈ S2 ⊢ n ≤ Finset.sup S2 id
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h2 S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h n : ℕ hn : n ∈ S2 ⊢ n ≤ Finset.sup S2 id TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
intro n
S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∀ (n : ℕ), n ∈ S ↔ n ∈ S2
S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N n : ℕ ⊢ n ∈ S ↔ n ∈ S2
Please generate a tactic in lean4 to solve the state. STATE: S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N ⊢ ∀ (n : ℕ), n ∈ S ↔ n ∈ S2 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_iff_arb_large
[51, 1]
[77, 4]
exact (Set.Finite.mem_toFinset h).symm
S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N n : ℕ ⊢ n ∈ S ↔ n ∈ S2
no goals
Please generate a tactic in lean4 to solve the state. STATE: S : Set ℕ h : Set.Finite S S2 : Finset ℕ := Set.Finite.toFinset h N : ℕ hN : ∀ (n : ℕ), n ∈ S2 → n ≤ N n : ℕ ⊢ n ∈ S ↔ n ∈ S2 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_set_of_solutions
[81, 1]
[83, 23]
rw [infinite_iff_arb_large]
⊢ Set.Infinite { n | 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 }
⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ { n | 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 }
Please generate a tactic in lean4 to solve the state. STATE: ⊢ Set.Infinite { n | 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 } TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NumberTheory3Solutions.lean
infinite_set_of_solutions
[81, 1]
[83, 23]
exact arb_large_soln
⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ { n | 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 }
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊢ ∀ (N : ℕ), ∃ n, n > N ∧ n ∈ { n | 5 ∣ 4 * n ^ 2 + 1 ∧ 13 ∣ 4 * n ^ 2 + 1 } TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.mul_eq_of_eq_inv_mul
[43, 1]
[45, 8]
sorry
G : Type inst✝ : MyGroup G a b c : G h : b = a⁻¹ * c ⊢ a * b = c
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a b c : G h : b = a⁻¹ * c ⊢ a * b = c TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.mul_one
[48, 1]
[50, 8]
sorry
G : Type inst✝ : MyGroup G a✝ b c a : G ⊢ a * 1 = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a✝ b c a : G ⊢ a * 1 = a TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.mul_inv_self
[53, 1]
[54, 8]
sorry
G : Type inst✝ : MyGroup G a✝ b c a : G ⊢ a * a⁻¹ = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a✝ b c a : G ⊢ a * a⁻¹ = 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.inv_mul_cancel_left
[80, 1]
[81, 8]
sorry
G : Type inst✝ : MyGroup G a b c : G ⊢ a⁻¹ * (a * b) = b
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a b c : G ⊢ a⁻¹ * (a * b) = b TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.mul_inv_cancel_left
[83, 1]
[84, 8]
sorry
G : Type inst✝ : MyGroup G a b c : G ⊢ a * (a⁻¹ * b) = b
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a b c : G ⊢ a * (a⁻¹ * b) = b TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.left_inv_eq_right_inv
[93, 1]
[95, 8]
sorry
G : Type inst✝ : MyGroup G a✝ b✝ c✝ a b c : G h1 : b * a = 1 h2 : a * c = 1 ⊢ b = c
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a✝ b✝ c✝ a b c : G h1 : b * a = 1 h2 : a * c = 1 ⊢ b = c TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.one_inv
[105, 1]
[106, 8]
sorry
G : Type inst✝ : MyGroup G a b c : G ⊢ 1⁻¹ = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a b c : G ⊢ 1⁻¹ = 1 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.inv_inv
[108, 1]
[109, 8]
sorry
G : Type inst✝ : MyGroup G a b c : G ⊢ a⁻¹⁻¹ = a
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a b c : G ⊢ a⁻¹⁻¹ = a TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/GroupTheory.lean
MyGroup.mul_inv_rev
[111, 1]
[112, 8]
sorry
G : Type inst✝ : MyGroup G a b c : G ⊢ (a * b)⁻¹ = b⁻¹ * a⁻¹
no goals
Please generate a tactic in lean4 to solve the state. STATE: G : Type inst✝ : MyGroup G a b c : G ⊢ (a * b)⁻¹ = b⁻¹ * a⁻¹ TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.add_zero
[59, 1]
[60, 6]
rfl
n : MyNat ⊢ n + 0 = n
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : MyNat ⊢ n + 0 = n TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.add_succ
[63, 1]
[64, 6]
rfl
n m : MyNat ⊢ n + succ m = succ (n + m)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n m : MyNat ⊢ n + succ m = succ (n + m) TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.easy
[69, 1]
[70, 6]
rfl
⊢ two + two = four
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊢ two + two = four TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.easy2
[73, 1]
[74, 6]
rfl
⊢ two + one = one + two
no goals
Please generate a tactic in lean4 to solve the state. STATE: ⊢ two + one = one + two TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.zero_add
[88, 1]
[92, 14]
induction' n with d hd
n : MyNat ⊢ 0 + n = n
case zero ⊢ 0 + 0 = 0 case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d
Please generate a tactic in lean4 to solve the state. STATE: n : MyNat ⊢ 0 + n = n TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.zero_add
[88, 1]
[92, 14]
{ rfl }
case zero ⊢ 0 + 0 = 0 case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d
case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ 0 + 0 = 0 case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.zero_add
[88, 1]
[92, 14]
{ rw [add_succ] rw [hd] }
case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.zero_add
[88, 1]
[92, 14]
rfl
case zero ⊢ 0 + 0 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero ⊢ 0 + 0 = 0 TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.zero_add
[88, 1]
[92, 14]
rw [add_succ]
case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d
case succ d : MyNat hd : 0 + d = d ⊢ succ (0 + d) = succ d
Please generate a tactic in lean4 to solve the state. STATE: case succ d : MyNat hd : 0 + d = d ⊢ 0 + succ d = succ d TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.zero_add
[88, 1]
[92, 14]
rw [hd]
case succ d : MyNat hd : 0 + d = d ⊢ succ (0 + d) = succ d
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ d : MyNat hd : 0 + d = d ⊢ succ (0 + d) = succ d TACTIC:
https://github.com/kbuzzard/IISc-experiments.git
f2f2d7d14b3ec1957fcdd38cc0e3657df6850047
IIScExperiments/Solutions/NatAddMulSolutions.lean
MyNat.succ_add
[96, 1]
[101, 34]
induction' b with d hd
a b : MyNat ⊢ succ a + b = succ (a + b)
case zero a : MyNat ⊢ succ a + 0 = succ (a + 0) case succ a d : MyNat hd : succ a + d = succ (a + d) ⊢ succ a + succ d = succ (a + succ d)
Please generate a tactic in lean4 to solve the state. STATE: a b : MyNat ⊢ succ a + b = succ (a + b) TACTIC: