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/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.find_none
[91, 1]
[103, 32]
split at heq
case cons.h_2.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝ : p head = false heq : (match Index.find? fun i => p i.tail with | some x_1 => some x_1.tail | none => none) = none a✝ : xs.Index ⊢...
case cons.h_2.tail.h_1 α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝¹ : p head = false a✝ : xs.Index opt✝ : Option xs.Index x✝ : xs.Index heq✝ : (Index.find? fun i => p i.tail) = some x✝ heq : some x✝.tail = no...
Please generate a tactic in lean4 to solve the state. STATE: case cons.h_2.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝ : p head = false heq : (match Index.find? fun i => p i.tail with | some x_1 =>...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.find_none
[91, 1]
[103, 32]
contradiction
case cons.h_2.tail.h_1 α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝¹ : p head = false a✝ : xs.Index opt✝ : Option xs.Index x✝ : xs.Index heq✝ : (Index.find? fun i => p i.tail) = some x✝ heq : some x✝.tail = no...
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.h_2.tail.h_1 α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝¹ : p head = false a✝ : xs.Index opt✝ : Option xs.Index x✝ : xs.Index heq✝ : (Ind...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.find_none
[91, 1]
[103, 32]
next h => rw [ih _ h]
case cons.h_2.tail.h_2 α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝¹ : p head = false a✝ : xs.Index opt✝ : Option xs.Index heq✝ : (Index.find? fun i => p i.tail) = none heq : none = none ⊢ p a✝.tail = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.h_2.tail.h_2 α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝¹ : p head = false a✝ : xs.Index opt✝ : Option xs.Index heq✝ : (Index.find? fun i...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.find_none
[91, 1]
[103, 32]
rw [ih _ h]
α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝ : p head = false a✝ : xs.Index opt✝ : Option xs.Index h : (Index.find? fun i => p i.tail) = none heq : none = none ⊢ p a✝.tail = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ {p : xs.Index → Bool} (i : xs.Index), Index.find? p = none → p i = false p : (x :: xs).Index → Bool c✝ : Bool heq✝ : p head = false a✝ : xs.Index opt✝ : Option xs.Index h : (Index.find? fun i => p i.tail) = none heq : ...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
unfold search
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i ⊢ p (search h)
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i ⊢ p (match hi : Index.find? fun i => decide ((fun i => p i) i) with | some i => i | none => absurd h ⋯)
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i ⊢ p (search h) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
split
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i ⊢ p (match hi : Index.find? fun i => decide ((fun i => p i) i) with | some i => i | none => absurd h ⋯)
case h_1 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i i✝ : xs.Index heq✝ : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ p i✝ case h_2 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i heq✝ : (Index.find? fun i => decide ((fun i =>...
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i ⊢ p (match hi : Index.find? fun i => decide ((fun i => p i) i) with | some i => i | none => absurd h ⋯) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
next h => apply of_decide_eq_true exact find_some _ h
case h_1 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i i✝ : xs.Index heq✝ : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ p i✝ case h_2 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i heq✝ : (Index.find? fun i => decide ((fun i =>...
case h_2 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i heq✝ : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ p (absurd h ⋯)
Please generate a tactic in lean4 to solve the state. STATE: case h_1 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i i✝ : xs.Index heq✝ : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ p i✝ case h_2 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred ...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
next f => absurd h intro ⟨j, hj⟩ have := find_none j f rw [decide_eq_true hj] at this contradiction
case h_2 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i heq✝ : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ p (absurd h ⋯)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h_2 α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i heq✝ : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ p (absurd h ⋯) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
apply of_decide_eq_true
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h✝ : ∃ i, p i i✝ : xs.Index h : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ p i✝
case a α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h✝ : ∃ i, p i i✝ : xs.Index h : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ decide (p i✝) = true
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h✝ : ∃ i, p i i✝ : xs.Index h : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ p i✝ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
exact find_some _ h
case a α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h✝ : ∃ i, p i i✝ : xs.Index h : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ decide (p i✝) = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h✝ : ∃ i, p i i✝ : xs.Index h : (Index.find? fun i => decide ((fun i => p i) i)) = some i✝ ⊢ decide (p i✝) = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
absurd h
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ p (absurd h ⋯)
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ ¬∃ i, p i
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ p (absurd h ⋯) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
intro ⟨j, hj⟩
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ ¬∃ i, p i
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none ⊢ ¬∃ i, p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
have := find_none j f
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j ⊢ False
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j this : decide ((fun i => p i) j) = false ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
rw [decide_eq_true hj] at this
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j this : decide ((fun i => p i) j) = false ⊢ False
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j this : true = false ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j this : decide ((fun i => p i) j) = false ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_prop
[114, 1]
[125, 18]
contradiction
α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j this : true = false ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop inst✝ : DecidablePred p h : ∃ i, p i f : (Index.find? fun i => decide ((fun i => p i) i)) = none j : xs.Index hj : p j this : true = false ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_eq
[127, 1]
[131, 6]
cases h
α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop ip : DecidablePred p iq : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : p = q ⊢ search hp = search hq
case refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp : ∃ i, p i iq : DecidablePred p hq : ∃ j, p j ⊢ search hp = search hq
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop ip : DecidablePred p iq : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : p = q ⊢ search hp = search hq TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_eq
[127, 1]
[131, 6]
cases Subsingleton.elim ip iq
case refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp : ∃ i, p i iq : DecidablePred p hq : ∃ j, p j ⊢ search hp = search hq
case refl.refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp hq : ∃ j, p j ⊢ search hp = search hq
Please generate a tactic in lean4 to solve the state. STATE: case refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp : ∃ i, p i iq : DecidablePred p hq : ∃ j, p j ⊢ search hp = search hq TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_eq
[127, 1]
[131, 6]
cases Subsingleton.elim hp hq
case refl.refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp hq : ∃ j, p j ⊢ search hp = search hq
case refl.refl.refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp : ∃ i, p i ⊢ search hp = search hp
Please generate a tactic in lean4 to solve the state. STATE: case refl.refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp hq : ∃ j, p j ⊢ search hp = search hq TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_eq
[127, 1]
[131, 6]
rfl
case refl.refl.refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp : ∃ i, p i ⊢ search hp = search hp
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refl.refl.refl α✝ : Type u_1 xs : List α✝ p : xs.Index → Prop ip : DecidablePred p hp : ∃ i, p i ⊢ search hp = search hp TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_ext
[133, 1]
[137, 22]
intro h
α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j ⊢ (∀ (i : xs.Index), p i ↔ q i) → search hp = search hq
α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i ⊢ search hp = search hq
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j ⊢ (∀ (i : xs.Index), p i ↔ q i) → search hp = search hq TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_ext
[133, 1]
[137, 22]
apply search_eq
α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i ⊢ search hp = search hq
case h α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i ⊢ (fun i => p i) = fun i => q i
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i ⊢ search hp = search hq TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_ext
[133, 1]
[137, 22]
funext i
case h α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i ⊢ (fun i => p i) = fun i => q i
case h.h α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i i : xs.Index ⊢ p i = q i
Please generate a tactic in lean4 to solve the state. STATE: case h α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i ⊢ (fun i => p i) = fun i => q i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.search_ext
[133, 1]
[137, 22]
exact propext (h i)
case h.h α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i i : xs.Index ⊢ p i = q i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.h α✝ : Type u_1 xs : List α✝ p q : xs.Index → Prop inst✝¹ : DecidablePred p inst✝ : DecidablePred q hp : ∃ i, p i hq : ∃ j, q j h : ∀ (i : xs.Index), p i ↔ q i i : xs.Index ⊢ p i = q i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_eq_toNatTR
[150, 10]
[158, 43]
funext _ _ i
⊢ @Index.toNat = @toNatTR
case h.h.h x✝¹ : Type u_1 x✝ : List x✝¹ i : x✝.Index ⊢ i.toNat = i.toNatTR
Please generate a tactic in lean4 to solve the state. STATE: ⊢ @Index.toNat = @toNatTR TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_eq_toNatTR
[150, 10]
[158, 43]
induction i with simp_all only [Index.toNat, toNatTR, toNatTR.loop] | tail => rw [lem]
case h.h.h x✝¹ : Type u_1 x✝ : List x✝¹ i : x✝.Index ⊢ i.toNat = i.toNatTR
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.h.h x✝¹ : Type u_1 x✝ : List x✝¹ i : x✝.Index ⊢ i.toNat = i.toNatTR TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_eq_toNatTR
[150, 10]
[158, 43]
rw [lem]
case h.h.h.tail x✝² : Type u_1 x✝¹ xs✝ : List x✝² x✝ : x✝² a✝ : xs✝.Index a_ih✝ : a✝.toNat = toNatTR.loop a✝ 0 ⊢ toNatTR.loop a✝ 0 + 1 = toNatTR.loop a✝ (0 + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.h.h.tail x✝² : Type u_1 x✝¹ xs✝ : List x✝² x✝ : x✝² a✝ : xs✝.Index a_ih✝ : a✝.toNat = toNatTR.loop a✝ 0 ⊢ toNatTR.loop a✝ 0 + 1 = toNatTR.loop a✝ (0 + 1) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_eq_toNatTR
[150, 10]
[158, 43]
induction i generalizing n with | head => rfl | tail _ ih => simp [toNatTR.loop, ih]
α : Type ?u.14515 xs : List α i : xs.Index n : Nat ⊢ toNatTR.loop i (n + 1) = toNatTR.loop i n + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type ?u.14515 xs : List α i : xs.Index n : Nat ⊢ toNatTR.loop i (n + 1) = toNatTR.loop i n + 1 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_eq_toNatTR
[150, 10]
[158, 43]
rfl
case head α : Type ?u.14515 xs : List α x✝ : α xs✝ : List α n : Nat ⊢ toNatTR.loop head (n + 1) = toNatTR.loop head n + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case head α : Type ?u.14515 xs : List α x✝ : α xs✝ : List α n : Nat ⊢ toNatTR.loop head (n + 1) = toNatTR.loop head n + 1 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_eq_toNatTR
[150, 10]
[158, 43]
simp [toNatTR.loop, ih]
case tail α : Type ?u.14515 xs xs✝ : List α x✝ : α a✝ : xs✝.Index ih : ∀ (n : Nat), toNatTR.loop a✝ (n + 1) = toNatTR.loop a✝ n + 1 n : Nat ⊢ toNatTR.loop a✝.tail (n + 1) = toNatTR.loop a✝.tail n + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case tail α : Type ?u.14515 xs xs✝ : List α x✝ : α a✝ : xs✝.Index ih : ∀ (n : Nat), toNatTR.loop a✝ (n + 1) = toNatTR.loop a✝ n + 1 n : Nat ⊢ toNatTR.loop a✝.tail (n + 1) = toNatTR.loop a✝.tail n + 1 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_lt_length
[160, 1]
[166, 44]
induction xs with | nil => cases i | cons x xs ih => cases i with | head => exact Nat.zero_lt_succ .. | tail => apply Nat.succ_lt_succ (ih _)
α✝ : Type u_1 xs : List α✝ i : xs.Index ⊢ i.toNat < xs.length
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ i : xs.Index ⊢ i.toNat < xs.length TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_lt_length
[160, 1]
[166, 44]
cases i
case nil α✝ : Type u_1 i : [].Index ⊢ i.toNat < [].length
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α✝ : Type u_1 i : [].Index ⊢ i.toNat < [].length TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_lt_length
[160, 1]
[166, 44]
cases i with | head => exact Nat.zero_lt_succ .. | tail => apply Nat.succ_lt_succ (ih _)
case cons α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), i.toNat < xs.length i : (x :: xs).Index ⊢ i.toNat < (x :: xs).length
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), i.toNat < xs.length i : (x :: xs).Index ⊢ i.toNat < (x :: xs).length TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_lt_length
[160, 1]
[166, 44]
exact Nat.zero_lt_succ ..
case cons.head α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), i.toNat < xs.length ⊢ head.toNat < (x :: xs).length
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.head α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), i.toNat < xs.length ⊢ head.toNat < (x :: xs).length TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_lt_length
[160, 1]
[166, 44]
apply Nat.succ_lt_succ (ih _)
case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), i.toNat < xs.length a✝ : xs.Index ⊢ a✝.tail.toNat < (x :: xs).length
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), i.toNat < xs.length a✝ : xs.Index ⊢ a✝.tail.toNat < (x :: xs).length TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.ofFin_toFin
[183, 1]
[191, 18]
induction xs with | nil => cases i | cons x xs ih => cases i with | head => rfl | tail i => apply congrArg tail exact ih ..
α✝ : Type u_1 xs : List α✝ i : xs.Index ⊢ Index.ofFin i.toFin = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 xs : List α✝ i : xs.Index ⊢ Index.ofFin i.toFin = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.ofFin_toFin
[183, 1]
[191, 18]
cases i
case nil α✝ : Type u_1 i : [].Index ⊢ Index.ofFin i.toFin = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α✝ : Type u_1 i : [].Index ⊢ Index.ofFin i.toFin = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.ofFin_toFin
[183, 1]
[191, 18]
cases i with | head => rfl | tail i => apply congrArg tail exact ih ..
case cons α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : (x :: xs).Index ⊢ Index.ofFin i.toFin = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : (x :: xs).Index ⊢ Index.ofFin i.toFin = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.ofFin_toFin
[183, 1]
[191, 18]
rfl
case cons.head α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i ⊢ Index.ofFin head.toFin = head
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.head α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i ⊢ Index.ofFin head.toFin = head TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.ofFin_toFin
[183, 1]
[191, 18]
apply congrArg tail
case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : xs.Index ⊢ Index.ofFin i.tail.toFin = i.tail
case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : xs.Index ⊢ Index.ofFin ⟨i.toNat, ⋯⟩ = i
Please generate a tactic in lean4 to solve the state. STATE: case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : xs.Index ⊢ Index.ofFin i.tail.toFin = i.tail TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.ofFin_toFin
[183, 1]
[191, 18]
exact ih ..
case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : xs.Index ⊢ Index.ofFin ⟨i.toNat, ⋯⟩ = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.tail α✝ : Type u_1 x : α✝ xs : List α✝ ih : ∀ (i : xs.Index), Index.ofFin i.toFin = i i : xs.Index ⊢ Index.ofFin ⟨i.toNat, ⋯⟩ = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
induction xs with | nil => cases i; contradiction | cons x xs ih => match i with | ⟨0,_⟩ => rfl | ⟨i+1,h⟩ => apply congrArg Nat.succ rw [ih]
α : Type u_1 xs : List α i : Fin xs.length ⊢ (Index.ofFin i).toNat = ↑i
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α i : Fin xs.length ⊢ (Index.ofFin i).toNat = ↑i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
cases i
case nil α : Type u_1 i : Fin [].length ⊢ (Index.ofFin i).toNat = ↑i
case nil.mk α : Type u_1 val✝ : Nat isLt✝ : val✝ < [].length ⊢ (Index.ofFin ⟨val✝, isLt✝⟩).toNat = ↑⟨val✝, isLt✝⟩
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 i : Fin [].length ⊢ (Index.ofFin i).toNat = ↑i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
contradiction
case nil.mk α : Type u_1 val✝ : Nat isLt✝ : val✝ < [].length ⊢ (Index.ofFin ⟨val✝, isLt✝⟩).toNat = ↑⟨val✝, isLt✝⟩
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.mk α : Type u_1 val✝ : Nat isLt✝ : val✝ < [].length ⊢ (Index.ofFin ⟨val✝, isLt✝⟩).toNat = ↑⟨val✝, isLt✝⟩ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
match i with | ⟨0,_⟩ => rfl | ⟨i+1,h⟩ => apply congrArg Nat.succ rw [ih]
case cons α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i : Fin (x :: xs).length ⊢ (Index.ofFin i).toNat = ↑i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i : Fin (x :: xs).length ⊢ (Index.ofFin i).toNat = ↑i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
rfl
α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i : Fin (x :: xs).length isLt✝ : 0 < (x :: xs).length ⊢ (Index.ofFin ⟨0, isLt✝⟩).toNat = ↑⟨0, isLt✝⟩
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i : Fin (x :: xs).length isLt✝ : 0 < (x :: xs).length ⊢ (Index.ofFin ⟨0, isLt✝⟩).toNat = ↑⟨0, isLt✝⟩ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
apply congrArg Nat.succ
α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i✝ : Fin (x :: xs).length i : Nat h : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i + 1, h⟩).toNat = ↑⟨i + 1, h⟩
α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i✝ : Fin (x :: xs).length i : Nat h : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i, ⋯⟩).toNat = i
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i✝ : Fin (x :: xs).length i : Nat h : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i + 1, h⟩).toNat = ↑⟨i + 1, h⟩ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toNat_ofFin
[193, 1]
[201, 14]
rw [ih]
α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i✝ : Fin (x :: xs).length i : Nat h : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i, ⋯⟩).toNat = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).toNat = ↑i i✝ : Fin (x :: xs).length i : Nat h : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i, ⋯⟩).toNat = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toFin_ofFin
[203, 1]
[205, 20]
apply Fin.eq_of_val_eq
α : Type u_1 xs : List α i : Fin xs.length ⊢ (Index.ofFin i).toFin = i
case a α : Type u_1 xs : List α i : Fin xs.length ⊢ ↑(Index.ofFin i).toFin = ↑i
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α i : Fin xs.length ⊢ (Index.ofFin i).toFin = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.toFin_ofFin
[203, 1]
[205, 20]
apply toNat_ofFin
case a α : Type u_1 xs : List α i : Fin xs.length ⊢ ↑(Index.ofFin i).toFin = ↑i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a α : Type u_1 xs : List α i : Fin xs.length ⊢ ↑(Index.ofFin i).toFin = ↑i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.val_ofFin_eq_get
[215, 1]
[221, 41]
induction xs with | nil => cases i; contradiction | cons x xs ih => match i with | ⟨0, _⟩ => rfl | ⟨i+1, _⟩ => simp [Index.ofFin, ih]
α : Type u_1 xs : List α i : Fin xs.length ⊢ (Index.ofFin i).val = xs.get i
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α i : Fin xs.length ⊢ (Index.ofFin i).val = xs.get i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.val_ofFin_eq_get
[215, 1]
[221, 41]
cases i
case nil α : Type u_1 i : Fin [].length ⊢ (Index.ofFin i).val = [].get i
case nil.mk α : Type u_1 val✝ : Nat isLt✝ : val✝ < [].length ⊢ (Index.ofFin ⟨val✝, isLt✝⟩).val = [].get ⟨val✝, isLt✝⟩
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 i : Fin [].length ⊢ (Index.ofFin i).val = [].get i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.val_ofFin_eq_get
[215, 1]
[221, 41]
contradiction
case nil.mk α : Type u_1 val✝ : Nat isLt✝ : val✝ < [].length ⊢ (Index.ofFin ⟨val✝, isLt✝⟩).val = [].get ⟨val✝, isLt✝⟩
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.mk α : Type u_1 val✝ : Nat isLt✝ : val✝ < [].length ⊢ (Index.ofFin ⟨val✝, isLt✝⟩).val = [].get ⟨val✝, isLt✝⟩ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.val_ofFin_eq_get
[215, 1]
[221, 41]
match i with | ⟨0, _⟩ => rfl | ⟨i+1, _⟩ => simp [Index.ofFin, ih]
case cons α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).val = xs.get i i : Fin (x :: xs).length ⊢ (Index.ofFin i).val = (x :: xs).get i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).val = xs.get i i : Fin (x :: xs).length ⊢ (Index.ofFin i).val = (x :: xs).get i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.val_ofFin_eq_get
[215, 1]
[221, 41]
rfl
α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).val = xs.get i i : Fin (x :: xs).length isLt✝ : 0 < (x :: xs).length ⊢ (Index.ofFin ⟨0, isLt✝⟩).val = (x :: xs).get ⟨0, isLt✝⟩
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).val = xs.get i i : Fin (x :: xs).length isLt✝ : 0 < (x :: xs).length ⊢ (Index.ofFin ⟨0, isLt✝⟩).val = (x :: xs).get ⟨0, isLt✝⟩ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Basic.lean
List.Index.val_ofFin_eq_get
[215, 1]
[221, 41]
simp [Index.ofFin, ih]
α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).val = xs.get i i✝ : Fin (x :: xs).length i : Nat isLt✝ : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i + 1, isLt✝⟩).val = (x :: xs).get ⟨i + 1, isLt✝⟩
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ih : ∀ (i : Fin xs.length), (Index.ofFin i).val = xs.get i i✝ : Fin (x :: xs).length i : Nat isLt✝ : i + 1 < (x :: xs).length ⊢ (Index.ofFin ⟨i + 1, isLt✝⟩).val = (x :: xs).get ⟨i + 1, isLt✝⟩ TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_map
[23, 1]
[26, 40]
induction i with | head => rfl | tail i ih => exact congrArg tail ih
α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index ⊢ unmap f (map f i) = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index ⊢ unmap f (map f i) = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_map
[23, 1]
[26, 40]
rfl
case head α : Type u_1 β : Type u_2 f : α → β xs : List α x✝ : α xs✝ : List α ⊢ unmap f (map f head) = head
no goals
Please generate a tactic in lean4 to solve the state. STATE: case head α : Type u_1 β : Type u_2 f : α → β xs : List α x✝ : α xs✝ : List α ⊢ unmap f (map f head) = head TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_map
[23, 1]
[26, 40]
exact congrArg tail ih
case tail α : Type u_1 β : Type u_2 f : α → β xs xs✝ : List α x✝ : α i : xs✝.Index ih : unmap f (map f i) = i ⊢ unmap f (map f i.tail) = i.tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: case tail α : Type u_1 β : Type u_2 f : α → β xs xs✝ : List α x✝ : α i : xs✝.Index ih : unmap f (map f i) = i ⊢ unmap f (map f i.tail) = i.tail TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_unmap
[28, 1]
[34, 43]
induction xs with | nil => contradiction | cons x xs ih => match i with | head => rfl | tail i => exact congrArg tail (ih i)
α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index ⊢ map f (unmap f i) = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index ⊢ map f (unmap f i) = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_unmap
[28, 1]
[34, 43]
contradiction
case nil α : Type u_1 β : Type u_2 f : α → β i : (List.map f []).Index ⊢ map f (unmap f i) = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 β : Type u_2 f : α → β i : (List.map f []).Index ⊢ map f (unmap f i) = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_unmap
[28, 1]
[34, 43]
match i with | head => rfl | tail i => exact congrArg tail (ih i)
case cons α : Type u_1 β : Type u_2 f : α → β x : α xs : List α ih : ∀ (i : (List.map f xs).Index), map f (unmap f i) = i i : (List.map f (x :: xs)).Index ⊢ map f (unmap f i) = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 β : Type u_2 f : α → β x : α xs : List α ih : ∀ (i : (List.map f xs).Index), map f (unmap f i) = i i : (List.map f (x :: xs)).Index ⊢ map f (unmap f i) = i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_unmap
[28, 1]
[34, 43]
rfl
α : Type u_1 β : Type u_2 f : α → β x : α xs : List α ih : ∀ (i : (List.map f xs).Index), map f (unmap f i) = i i : (List.map f (x :: xs)).Index ⊢ map f (unmap f head) = head
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β x : α xs : List α ih : ∀ (i : (List.map f xs).Index), map f (unmap f i) = i i : (List.map f (x :: xs)).Index ⊢ map f (unmap f head) = head TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_unmap
[28, 1]
[34, 43]
exact congrArg tail (ih i)
α : Type u_1 β : Type u_2 f : α → β x : α xs : List α ih : ∀ (i : (List.map f xs).Index), map f (unmap f i) = i i✝ : (List.map f (x :: xs)).Index i : (List.map f xs).Index ⊢ map f (unmap f i.tail) = i.tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β x : α xs : List α ih : ∀ (i : (List.map f xs).Index), map f (unmap f i) = i i✝ : (List.map f (x :: xs)).Index i : (List.map f xs).Index ⊢ map f (unmap f i.tail) = i.tail TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_eq_iff_eq_unmap
[36, 1]
[39, 31]
constructor
α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ map f i = j ↔ i = unmap f j
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ map f i = j → i = unmap f j case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ i = unmap f j → map f i = j
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ map f i = j ↔ i = unmap f j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_eq_iff_eq_unmap
[36, 1]
[39, 31]
intro h
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ map f i = j → i = unmap f j
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index h : map f i = j ⊢ i = unmap f j
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ map f i = j → i = unmap f j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_eq_iff_eq_unmap
[36, 1]
[39, 31]
rw [←h, unmap_map]
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index h : map f i = j ⊢ i = unmap f j
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index h : map f i = j ⊢ i = unmap f j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_eq_iff_eq_unmap
[36, 1]
[39, 31]
intro h
case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ i = unmap f j → map f i = j
case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index h : i = unmap f j ⊢ map f i = j
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index ⊢ i = unmap f j → map f i = j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.map_eq_iff_eq_unmap
[36, 1]
[39, 31]
rw [h, map_unmap]
case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index h : i = unmap f j ⊢ map f i = j
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index j : (List.map f xs).Index h : i = unmap f j ⊢ map f i = j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_eq_iff_eq_map
[41, 1]
[44, 31]
constructor
α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ unmap f i = j ↔ i = map f j
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ unmap f i = j → i = map f j case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ i = map f j → unmap f i = j
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ unmap f i = j ↔ i = map f j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_eq_iff_eq_map
[41, 1]
[44, 31]
intro h
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ unmap f i = j → i = map f j
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index h : unmap f i = j ⊢ i = map f j
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ unmap f i = j → i = map f j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_eq_iff_eq_map
[41, 1]
[44, 31]
rw [←h, map_unmap]
case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index h : unmap f i = j ⊢ i = map f j
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index h : unmap f i = j ⊢ i = map f j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_eq_iff_eq_map
[41, 1]
[44, 31]
intro h
case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ i = map f j → unmap f i = j
case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index h : i = map f j ⊢ unmap f i = j
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index ⊢ i = map f j → unmap f i = j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.unmap_eq_iff_eq_map
[41, 1]
[44, 31]
rw [h, unmap_map]
case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index h : i = map f j ⊢ unmap f i = j
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index j : xs.Index h : i = map f j ⊢ unmap f i = j TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.val_map
[55, 1]
[58, 26]
induction i with | head => rfl | tail _ ih => exact ih
α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index ⊢ (map f i).val = f i.val
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β xs : List α i : xs.Index ⊢ (map f i).val = f i.val TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.val_map
[55, 1]
[58, 26]
rfl
case head α : Type u_1 β : Type u_2 f : α → β xs : List α x✝ : α xs✝ : List α ⊢ (map f head).val = f head.val
no goals
Please generate a tactic in lean4 to solve the state. STATE: case head α : Type u_1 β : Type u_2 f : α → β xs : List α x✝ : α xs✝ : List α ⊢ (map f head).val = f head.val TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.val_map
[55, 1]
[58, 26]
exact ih
case tail α : Type u_1 β : Type u_2 f : α → β xs xs✝ : List α x✝ : α a✝ : xs✝.Index ih : (map f a✝).val = f a✝.val ⊢ (map f a✝.tail).val = f a✝.tail.val
no goals
Please generate a tactic in lean4 to solve the state. STATE: case tail α : Type u_1 β : Type u_2 f : α → β xs xs✝ : List α x✝ : α a✝ : xs✝.Index ih : (map f a✝).val = f a✝.val ⊢ (map f a✝.tail).val = f a✝.tail.val TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Index/Map.lean
List.Index.val_unmap
[60, 1]
[61, 42]
rw [←map_unmap f i, val_map, unmap_map]
α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index ⊢ i.val = f (unmap f i).val
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β xs : List α i : (List.map f xs).Index ⊢ i.val = f (unmap f i).val TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_div_two
[5, 9]
[5, 63]
omega
x : Nat ⊢ 2 * x / 2 = x
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : Nat ⊢ 2 * x / 2 = x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit1_div_two
[7, 9]
[7, 67]
omega
x : Nat ⊢ (2 * x + 1) / 2 = x
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : Nat ⊢ (2 * x + 1) / 2 = x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_mod_two
[9, 9]
[9, 63]
omega
x : Nat ⊢ 2 * x % 2 = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : Nat ⊢ 2 * x % 2 = 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit1_mod_two
[11, 9]
[11, 67]
omega
x : Nat ⊢ (2 * x + 1) % 2 = 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: x : Nat ⊢ (2 * x + 1) % 2 = 1 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.zero_bitwise
[41, 9]
[42, 21]
rw [bitwise]
f : Bool → Bool → Bool y : Nat ⊢ bitwise f 0 y = bif f false true then y else 0
f : Bool → Bool → Bool y : Nat ⊢ (if 0 = 0 then if f false true = true then y else 0 else if y = 0 then if f true false = true then 0 else 0 else let n' := 0 / 2; let m' := y / 2; let b₁ := 0 % 2 = 1; let b₂ := y % 2 = 1; let r := bitwise f n' m'; if f (de...
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool y : Nat ⊢ bitwise f 0 y = bif f false true then y else 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.zero_bitwise
[41, 9]
[42, 21]
simp
f : Bool → Bool → Bool y : Nat ⊢ (if 0 = 0 then if f false true = true then y else 0 else if y = 0 then if f true false = true then 0 else 0 else let n' := 0 / 2; let m' := y / 2; let b₁ := 0 % 2 = 1; let b₂ := y % 2 = 1; let r := bitwise f n' m'; if f (de...
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool y : Nat ⊢ (if 0 = 0 then if f false true = true then y else 0 else if y = 0 then if f true false = true then 0 else 0 else let n' := 0 / 2; let m' := y / 2; let b₁ := 0 % 2 = 1; let b₂ := ...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_zero
[44, 9]
[45, 35]
rw [bitwise]
f : Bool → Bool → Bool x : Nat ⊢ bitwise f x 0 = bif f true false then x else 0
f : Bool → Bool → Bool x : Nat ⊢ (if x = 0 then if f false true = true then 0 else 0 else if 0 = 0 then if f true false = true then x else 0 else let n' := x / 2; let m' := 0 / 2; let b₁ := x % 2 = 1; let b₂ := 0 % 2 = 1; let r := bitwise f n' m'; if f (de...
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x : Nat ⊢ bitwise f x 0 = bif f true false then x else 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_zero
[44, 9]
[45, 35]
split <;> simp [*]
f : Bool → Bool → Bool x : Nat ⊢ (if x = 0 then if f false true = true then 0 else 0 else if 0 = 0 then if f true false = true then x else 0 else let n' := x / 2; let m' := 0 / 2; let b₁ := x % 2 = 1; let b₂ := 0 % 2 = 1; let r := bitwise f n' m'; if f (de...
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x : Nat ⊢ (if x = 0 then if f false true = true then 0 else 0 else if 0 = 0 then if f true false = true then x else 0 else let n' := x / 2; let m' := 0 / 2; let b₁ := x % 2 = 1; let b₂ := ...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.pos_bitwise_pos
[47, 1]
[51, 34]
rw [bitwise]
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ bitwise f x y = 2 * bitwise f (x / 2) (y / 2) + bif f (decide (x % 2 = 1)) (decide (y % 2 = 1)) then 1 else 0
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ (if x = 0 then if f false true = true then y else 0 else if y = 0 then if f true false = true then x else 0 else let n' := x / 2; let m' := y / 2; let b₁ := x % 2 = 1; let b₂ := y % 2 = 1; let r := bitwise f...
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ bitwise f x y = 2 * bitwise f (x / 2) (y / 2) + bif f (decide (x % 2 = 1)) (decide (y % 2 = 1)) then 1 else 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.pos_bitwise_pos
[47, 1]
[51, 34]
simp [hx, hy]
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ (if x = 0 then if f false true = true then y else 0 else if y = 0 then if f true false = true then x else 0 else let n' := x / 2; let m' := y / 2; let b₁ := x % 2 = 1; let b₂ := y % 2 = 1; let r := bitwise f...
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ (if f (decide (x % 2 = 1)) (decide (y % 2 = 1)) = true then bitwise f (x / 2) (y / 2) + bitwise f (x / 2) (y / 2) + 1 else bitwise f (x / 2) (y / 2) + bitwise f (x / 2) (y / 2)) = 2 * bitwise f (x / 2) (y / 2) + bif f (decide (x % 2 = 1)) (decide (y % 2 =...
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ (if x = 0 then if f false true = true then y else 0 else if y = 0 then if f true false = true then x else 0 else let n' := x / 2; let m' := y / 2; let b₁ := x % 2...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.pos_bitwise_pos
[47, 1]
[51, 34]
split <;> simp [*, Nat.two_mul]
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ (if f (decide (x % 2 = 1)) (decide (y % 2 = 1)) = true then bitwise f (x / 2) (y / 2) + bitwise f (x / 2) (y / 2) + 1 else bitwise f (x / 2) (y / 2) + bitwise f (x / 2) (y / 2)) = 2 * bitwise f (x / 2) (y / 2) + bif f (decide (x % 2 = 1)) (decide (y % 2 =...
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ (if f (decide (x % 2 = 1)) (decide (y % 2 = 1)) = true then bitwise f (x / 2) (y / 2) + bitwise f (x / 2) (y / 2) + 1 else bitwise f (x / 2) (y / 2) + bitwise f (x / 2) (y / 2)) = 2 * bitwise f ...
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_flip
[53, 1]
[59, 68]
if x = 0 then simp [*, flip] else if y = 0 then simp [*, flip] else simp [*, pos_bitwise_pos, flip, bitwise_flip f (x / 2) (y / 2)]
f : Bool → Bool → Bool x y : Nat ⊢ bitwise f x y = bitwise (flip f) y x
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x y : Nat ⊢ bitwise f x y = bitwise (flip f) y x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_flip
[53, 1]
[59, 68]
simp [*, flip]
f : Bool → Bool → Bool x y : Nat h✝ : x = 0 ⊢ bitwise f x y = bitwise (flip f) y x
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x y : Nat h✝ : x = 0 ⊢ bitwise f x y = bitwise (flip f) y x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_flip
[53, 1]
[59, 68]
if y = 0 then simp [*, flip] else simp [*, pos_bitwise_pos, flip, bitwise_flip f (x / 2) (y / 2)]
f : Bool → Bool → Bool x y : Nat h✝ : ¬x = 0 ⊢ bitwise f x y = bitwise (flip f) y x
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x y : Nat h✝ : ¬x = 0 ⊢ bitwise f x y = bitwise (flip f) y x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_flip
[53, 1]
[59, 68]
simp [*, flip]
f : Bool → Bool → Bool x y : Nat h✝¹ : ¬x = 0 h✝ : y = 0 ⊢ bitwise f x y = bitwise (flip f) y x
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x y : Nat h✝¹ : ¬x = 0 h✝ : y = 0 ⊢ bitwise f x y = bitwise (flip f) y x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bitwise_flip
[53, 1]
[59, 68]
simp [*, pos_bitwise_pos, flip, bitwise_flip f (x / 2) (y / 2)]
f : Bool → Bool → Bool x y : Nat h✝¹ : ¬x = 0 h✝ : ¬y = 0 ⊢ bitwise f x y = bitwise (flip f) y x
no goals
Please generate a tactic in lean4 to solve the state. STATE: f : Bool → Bool → Bool x y : Nat h✝¹ : ¬x = 0 h✝ : ¬y = 0 ⊢ bitwise f x y = bitwise (flip f) y x TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
have hx2 : 2 * x ≠ 0 := by intro h; simp [Nat.mul_eq_zero] at h; contradiction
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
have hy2 : 2 * y ≠ 0 := by intro h; simp [Nat.mul_eq_zero] at h; contradiction
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 hy2 : 2 * y ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
simp [pos_bitwise_pos _ hx2 hy2]
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 hy2 : 2 * y ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 hy2 : 2 * y ≠ 0 ⊢ bitwise f (2 * x) (2 * y) = 2 * bitwise f x y + bif f false false then 1 else 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
intro h
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ 2 * x ≠ 0
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 h : 2 * x = 0 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 ⊢ 2 * x ≠ 0 TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
simp [Nat.mul_eq_zero] at h
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 h : 2 * x = 0 ⊢ False
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 h : x = 0 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 h : 2 * x = 0 ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
contradiction
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 h : x = 0 ⊢ False
no goals
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 h : x = 0 ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Nat/Bitwise.lean
Nat.bit0_bitwise_bit0
[61, 1]
[65, 35]
intro h
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 ⊢ 2 * y ≠ 0
x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 h : 2 * y = 0 ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: x y : Nat f : Bool → Bool → Bool hx : x ≠ 0 hy : y ≠ 0 hx2 : 2 * x ≠ 0 ⊢ 2 * y ≠ 0 TACTIC: