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/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C06_Structures/S03_Building_the_Gaussian_Integers.lean
gaussInt.not_norm_mul_left_lt_norm
[247, 1]
[254, 51]
rw [coe_natAbs_norm]
case h x y : gaussInt hy : y ≠ 0 ⊢ ↑1 ≤ ↑(Int.natAbs (norm y))
case h x y : gaussInt hy : y ≠ 0 ⊢ ↑1 ≤ norm y
Please generate a tactic in lean4 to solve the state. STATE: case h x y : gaussInt hy : y ≠ 0 ⊢ ↑1 ≤ ↑(Int.natAbs (norm y)) TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/MIL/C06_Structures/S03_Building_the_Gaussian_Integers.lean
gaussInt.not_norm_mul_left_lt_norm
[247, 1]
[254, 51]
exact Int.add_one_le_of_lt ((norm_pos _).mpr hy)
case h x y : gaussInt hy : y ≠ 0 ⊢ ↑1 ≤ norm y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h x y : gaussInt hy : y ≠ 0 ⊢ ↑1 ≤ norm y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture8Before.lean
Point.add_commutative
[135, 1]
[135, 93]
simp [add, add_comm]
n : ℕ a b : Point ⊢ add a b = add b a
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ a b : Point ⊢ add a b = add b a TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture8Before.lean
Point.add_x
[144, 1]
[144, 68]
rfl
n : ℕ a b : Point ⊢ (a + b).x = a.x + b.x
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ a b : Point ⊢ (a + b).x = a.x + b.x TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture8Before.lean
Point.add_y
[145, 1]
[145, 68]
rfl
n : ℕ a b : Point ⊢ (a + b).y = a.y + b.y
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ a b : Point ⊢ (a + b).y = a.y + b.y TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture8Before.lean
Point.add_z
[146, 1]
[146, 68]
rfl
n : ℕ a b : Point ⊢ (a + b).z = a.z + b.z
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ a b : Point ⊢ (a + b).z = a.z + b.z TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture8Before.lean
AbelianGroup.zero_add
[303, 1]
[304, 26]
rw [g.comm, g.add_zero]
n : ℕ g : AbelianGroup x : g.G ⊢ add g g.zero x = x
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ g : AbelianGroup x : g.G ⊢ add g g.zero x = x TACTIC:
https://github.com/fpvandoorn/LeanCourse23.git
7b0a3cf61b802764dc7baee9d9825e9c62cf9c5d
LeanCourse/Lectures/Lecture8Before.lean
PointedFunction.comp
[487, 1]
[489, 25]
sorry
n : ℕ X : PointedType Y : PointedType Z : PointedType g : Y →. Z f : X →. Y ⊢ (↑g ∘ ↑f) X.pt = Z.pt
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ X : PointedType Y : PointedType Z : PointedType g : Y →. Z f : X →. Y ⊢ (↑g ∘ ↑f) X.pt = Z.pt TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Lawful.lean
map_bind
[15, 1]
[19, 6]
rw [map_eq_pure_bind, bind_assoc]
m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ f <$> x >>= g = x >>= g ∘ f
m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ (x >>= fun x => pure (f x) >>= g) = x >>= g ∘ f
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ f <$> x >>= g = x >>= g ∘ f TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Lawful.lean
map_bind
[15, 1]
[19, 6]
apply bind_congr
m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ (x >>= fun x => pure (f x) >>= g) = x >>= g ∘ f
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ ∀ (a : α), pure (f a) >>= g = (g ∘ f) a
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ (x >>= fun x => pure (f x) >>= g) = x >>= g ∘ f TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Lawful.lean
map_bind
[15, 1]
[19, 6]
intro a
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ ∀ (a : α), pure (f a) >>= g = (g ∘ f) a
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ a : α ⊢ pure (f a) >>= g = (g ∘ f) a
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ ⊢ ∀ (a : α), pure (f a) >>= g = (g ∘ f) a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Lawful.lean
map_bind
[15, 1]
[19, 6]
rw [pure_bind]
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ a : α ⊢ pure (f a) >>= g = (g ∘ f) a
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ a : α ⊢ g (f a) = (g ∘ f) a
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ a : α ⊢ pure (f a) >>= g = (g ∘ f) a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Lawful.lean
map_bind
[15, 1]
[19, 6]
rfl
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ a : α ⊢ g (f a) = (g ∘ f) a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α β γ : Type u f : α → β x : m α g : β → m γ a : α ⊢ g (f a) = (g ∘ f) a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
have : wf₁ = wf₂ := by funext a exact (hf a).eq_param
W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) this : wf₁ = wf₂ ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
Please generate a tactic in lean4 to solve the state. STATE: W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
cases this
W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) this : wf₁ = wf₂ ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
case refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
Please generate a tactic in lean4 to solve the state. STATE: W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) this : wf₁ = wf₂ ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
have : f₁ = f₂ := by funext a exact (hf a).eq_of_deq
case refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
case refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) this : f₁ = f₂ ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
Please generate a tactic in lean4 to solve the state. STATE: case refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
cases this
case refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) this : f₁ = f₂ ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂)
case refl.refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₁ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₁)
Please generate a tactic in lean4 to solve the state. STATE: case refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) this : f₁ = f₂ ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₂) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
exact DEq.refl _
case refl.refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₁ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₁)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refl.refl W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₁ a) ⊢ DEq (M β) (dbind x✝ f₁) (dbind x✝ f₁) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
funext a
W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ wf₁ = wf₂
case h W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) a : α ⊢ wf₁ a = wf₂ a
Please generate a tactic in lean4 to solve the state. STATE: W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ wf₁ = wf₂ TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
exact (hf a).eq_param
case h W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) a : α ⊢ wf₁ a = wf₂ a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ wf₂ : α → W β x✝ : M α a✝ f₁ : (a : α) → M β (wf₁ a) f₂ : (a : α) → M β (wf₂ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) a : α ⊢ wf₁ a = wf₂ a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
funext a
W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ f₁ = f₂
case h W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) a : α ⊢ f₁ a = f₂ a
Please generate a tactic in lean4 to solve the state. STATE: W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) ⊢ f₁ = f₂ TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.dbind_congr
[65, 1]
[75, 19]
exact (hf a).eq_of_deq
case h W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) a : α ⊢ f₁ a = f₂ a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h W : Type u → Type v inst✝¹ : Monad W M : (α : Type u) → W α → Type w inst✝ : DijkstraMonad W M α β : Type u a✝ : W α wf₁ : α → W β x✝ : M α a✝ f₁ f₂ : (a : α) → M β (wf₁ a) hf : ∀ (a : α), DEq (M β) (f₁ a) (f₂ a) a : α ⊢ f₁ a = f₂ a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.Push.deq
[114, 1]
[117, 19]
cases (Eq.trans hy.symm hx)
W₁ : Type u → Type v₁ inst✝¹ : Monad W₁ W₂ : Type u → Type v₂ inst✝ : Monad W₂ F : MonadHom W₁ W₂ M : (α : Type u) → W₁ α → Type w α : Type u wa₂ wa₂' : W₂ α base : W₁ α body✝ : M α base hx : MonadHom.app F base = wa₂ hy : MonadHom.app F base = wa₂' ⊢ DEq (Push F M α) { base := base, body := body✝, underly := hx } { base := base, body := body✝, underly := hy }
case refl W₁ : Type u → Type v₁ inst✝¹ : Monad W₁ W₂ : Type u → Type v₂ inst✝ : Monad W₂ F : MonadHom W₁ W₂ M : (α : Type u) → W₁ α → Type w α : Type u wa₂ : W₂ α base : W₁ α body✝ : M α base hx hy : MonadHom.app F base = wa₂ ⊢ DEq (Push F M α) { base := base, body := body✝, underly := hx } { base := base, body := body✝, underly := hy }
Please generate a tactic in lean4 to solve the state. STATE: W₁ : Type u → Type v₁ inst✝¹ : Monad W₁ W₂ : Type u → Type v₂ inst✝ : Monad W₂ F : MonadHom W₁ W₂ M : (α : Type u) → W₁ α → Type w α : Type u wa₂ wa₂' : W₂ α base : W₁ α body✝ : M α base hx : MonadHom.app F base = wa₂ hy : MonadHom.app F base = wa₂' ⊢ DEq (Push F M α) { base := base, body := body✝, underly := hx } { base := base, body := body✝, underly := hy } TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Dijkstra.lean
DijkstraMonad.Push.deq
[114, 1]
[117, 19]
exact DEq.refl _
case refl W₁ : Type u → Type v₁ inst✝¹ : Monad W₁ W₂ : Type u → Type v₂ inst✝ : Monad W₂ F : MonadHom W₁ W₂ M : (α : Type u) → W₁ α → Type w α : Type u wa₂ : W₂ α base : W₁ α body✝ : M α base hx hy : MonadHom.app F base = wa₂ ⊢ DEq (Push F M α) { base := base, body := body✝, underly := hx } { base := base, body := body✝, underly := hy }
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refl W₁ : Type u → Type v₁ inst✝¹ : Monad W₁ W₂ : Type u → Type v₂ inst✝ : Monad W₂ F : MonadHom W₁ W₂ M : (α : Type u) → W₁ α → Type w α : Type u wa₂ : W₂ α base : W₁ α body✝ : M α base hx hy : MonadHom.app F base = wa₂ ⊢ DEq (Push F M α) { base := base, body := body✝, underly := hx } { base := base, body := body✝, underly := hy } TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
induction as
α : Type u p : α → Prop as : List α h : forAll p as ⊢ Subtype.val <$> zipProof as h = as
case nil α : Type u p : α → Prop h : forAll p [] ⊢ Subtype.val <$> zipProof [] h = [] case cons α : Type u p : α → Prop head✝ : α tail✝ : List α tail_ih✝ : ∀ {h : forAll p tail✝}, Subtype.val <$> zipProof tail✝ h = tail✝ h : forAll p (head✝ :: tail✝) ⊢ Subtype.val <$> zipProof (head✝ :: tail✝) h = head✝ :: tail✝
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop as : List α h : forAll p as ⊢ Subtype.val <$> zipProof as h = as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
case nil => rfl
α : Type u p : α → Prop h : forAll p [] ⊢ Subtype.val <$> zipProof [] h = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop h : forAll p [] ⊢ Subtype.val <$> zipProof [] h = [] TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
case cons a as h_ind => cases h with | intro ha has => dsimp [Functor.map, zipProof, List.map] at * rw [h_ind]
α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, Subtype.val <$> zipProof as h = as h : forAll p (a :: as) ⊢ Subtype.val <$> zipProof (a :: as) h = a :: as
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, Subtype.val <$> zipProof as h = as h : forAll p (a :: as) ⊢ Subtype.val <$> zipProof (a :: as) h = a :: as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
rfl
α : Type u p : α → Prop h : forAll p [] ⊢ Subtype.val <$> zipProof [] h = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop h : forAll p [] ⊢ Subtype.val <$> zipProof [] h = [] TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
cases h with | intro ha has => dsimp [Functor.map, zipProof, List.map] at * rw [h_ind]
α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, Subtype.val <$> zipProof as h = as h : forAll p (a :: as) ⊢ Subtype.val <$> zipProof (a :: as) h = a :: as
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, Subtype.val <$> zipProof as h = as h : forAll p (a :: as) ⊢ Subtype.val <$> zipProof (a :: as) h = a :: as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
dsimp [Functor.map, zipProof, List.map] at *
case intro α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, Subtype.val <$> zipProof as h = as ha : p a has : forAll p as ⊢ Subtype.val <$> zipProof (a :: as) (_ : p a ∧ forAll p as) = a :: as
case intro α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, map Subtype.val (zipProof as h) = as ha : p a has : forAll p as ⊢ a :: map Subtype.val (zipProof as has) = a :: as
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, Subtype.val <$> zipProof as h = as ha : p a has : forAll p as ⊢ Subtype.val <$> zipProof (a :: as) (_ : p a ∧ forAll p as) = a :: as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.val_zipProof
[84, 1]
[90, 15]
rw [h_ind]
case intro α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, map Subtype.val (zipProof as h) = as ha : p a has : forAll p as ⊢ a :: map Subtype.val (zipProof as has) = a :: as
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u p : α → Prop a : α as : List α h_ind : ∀ {h : forAll p as}, map Subtype.val (zipProof as h) = as ha : p a has : forAll p as ⊢ a :: map Subtype.val (zipProof as has) = a :: as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
cases h with | intro xs hx => cases hx induction xs case nil => exact True.intro case cons a as h_ind => exact ⟨a.property, h_ind⟩
α : Type u p : α → Prop as : List α h : SatisfiesM p as ⊢ forAll p as
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop as : List α h : SatisfiesM p as ⊢ forAll p as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
cases hx
case intro α : Type u p : α → Prop as : List α xs : List { a // p a } hx : Subtype.val <$> xs = as ⊢ forAll p as
case intro.refl α : Type u p : α → Prop xs : List { a // p a } ⊢ forAll p (Subtype.val <$> xs)
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u p : α → Prop as : List α xs : List { a // p a } hx : Subtype.val <$> xs = as ⊢ forAll p as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
induction xs
case intro.refl α : Type u p : α → Prop xs : List { a // p a } ⊢ forAll p (Subtype.val <$> xs)
case intro.refl.nil α : Type u p : α → Prop ⊢ forAll p (Subtype.val <$> []) case intro.refl.cons α : Type u p : α → Prop head✝ : { a // p a } tail✝ : List { a // p a } tail_ih✝ : forAll p (Subtype.val <$> tail✝) ⊢ forAll p (Subtype.val <$> (head✝ :: tail✝))
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl α : Type u p : α → Prop xs : List { a // p a } ⊢ forAll p (Subtype.val <$> xs) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
case nil => exact True.intro
α : Type u p : α → Prop ⊢ forAll p (Subtype.val <$> [])
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop ⊢ forAll p (Subtype.val <$> []) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
case cons a as h_ind => exact ⟨a.property, h_ind⟩
α : Type u p : α → Prop a : { a // p a } as : List { a // p a } h_ind : forAll p (Subtype.val <$> as) ⊢ forAll p (Subtype.val <$> (a :: as))
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop a : { a // p a } as : List { a // p a } h_ind : forAll p (Subtype.val <$> as) ⊢ forAll p (Subtype.val <$> (a :: as)) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
exact True.intro
α : Type u p : α → Prop ⊢ forAll p (Subtype.val <$> [])
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop ⊢ forAll p (Subtype.val <$> []) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
exact ⟨a.property, h_ind⟩
α : Type u p : α → Prop a : { a // p a } as : List { a // p a } h_ind : forAll p (Subtype.val <$> as) ⊢ forAll p (Subtype.val <$> (a :: as))
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop a : { a // p a } as : List { a // p a } h_ind : forAll p (Subtype.val <$> as) ⊢ forAll p (Subtype.val <$> (a :: as)) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
exists zipProof as h
α : Type u p : α → Prop as : List α h : forAll p as ⊢ SatisfiesM p as
α : Type u p : α → Prop as : List α h : forAll p as ⊢ Subtype.val <$> zipProof as h = as
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop as : List α h : forAll p as ⊢ SatisfiesM p as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
List.SatisfiesM_List_eq
[92, 1]
[102, 26]
exact val_zipProof as
α : Type u p : α → Prop as : List α h : forAll p as ⊢ Subtype.val <$> zipProof as h = as
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u p : α → Prop as : List α h : forAll p as ⊢ Subtype.val <$> zipProof as h = as TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
rw [Functor.map, Applicative.toFunctor, Monad.toApplicative]
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ f <$> x = errorOrApply f <$> x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ instMonadExceptT.1.1.1 f x = errorOrApply f <$> x
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ f <$> x = errorOrApply f <$> x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
unfold instMonadExceptT
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ instMonadExceptT.1.1.1 f x = errorOrApply f <$> x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ Monad.mk.1.1.1 f x = errorOrApply f <$> x
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ instMonadExceptT.1.1.1 f x = errorOrApply f <$> x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
simp
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ Monad.mk.1.1.1 f x = errorOrApply f <$> x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ ExceptT.map f x = errorOrApply f <$> x
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ Monad.mk.1.1.1 f x = errorOrApply f <$> x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
unfold ExceptT.map
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ ExceptT.map f x = errorOrApply f <$> x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ (mk do let a ← x match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = errorOrApply f <$> x
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ ExceptT.map f x = errorOrApply f <$> x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
rw [map_eq_pure_bind]
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ (mk do let a ← x match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = errorOrApply f <$> x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ (mk do let a ← x match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = do let a ← x pure (errorOrApply f a)
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ (mk do let a ← x match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = errorOrApply f <$> x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
apply bind_congr
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ (mk do let a ← x match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = do let a ← x pure (errorOrApply f a)
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ ∀ (a : Except ε α), (match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = pure (errorOrApply f a)
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ (mk do let a ← x match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = do let a ← x pure (errorOrApply f a) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
intro e
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ ∀ (a : Except ε α), (match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = pure (errorOrApply f a)
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α e : Except ε α ⊢ (match e with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = pure (errorOrApply f e)
Please generate a tactic in lean4 to solve the state. STATE: case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α ⊢ ∀ (a : Except ε α), (match a with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = pure (errorOrApply f a) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.map_eq_map_errorOrApply
[130, 1]
[137, 27]
cases e <;> rfl
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α e : Except ε α ⊢ (match e with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = pure (errorOrApply f e)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m f : α → β x : ExceptT ε m α e : Except ε α ⊢ (match e with | Except.ok a => pure (Except.ok (f a)) | Except.error e => pure (Except.error e)) = pure (errorOrApply f e) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.errorOrApply_val
[151, 1]
[153, 18]
funext x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop ⊢ errorOrApply Subtype.val = Subtype.val ∘ toSubtype
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop x : Except ε (Subtype p) ⊢ errorOrApply Subtype.val x = (Subtype.val ∘ toSubtype) x
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop ⊢ errorOrApply Subtype.val = Subtype.val ∘ toSubtype TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.errorOrApply_val
[151, 1]
[153, 18]
cases x <;> rfl
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop x : Except ε (Subtype p) ⊢ errorOrApply Subtype.val x = (Subtype.val ∘ toSubtype) x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop x : Except ε (Subtype p) ⊢ errorOrApply Subtype.val x = (Subtype.val ∘ toSubtype) x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.from_toSubtype
[155, 1]
[157, 18]
funext x
α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop ⊢ fromSubtype ∘ toSubtype = id
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop x : Except ε (Subtype p) ⊢ (fromSubtype ∘ toSubtype) x = id x
Please generate a tactic in lean4 to solve the state. STATE: α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop ⊢ fromSubtype ∘ toSubtype = id TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
ExceptT.from_toSubtype
[155, 1]
[157, 18]
cases x <;> rfl
case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop x : Except ε (Subtype p) ⊢ (fromSubtype ∘ toSubtype) x = id x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h α β ε : Type u m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m p : α → Prop x : Except ε (Subtype p) ⊢ (fromSubtype ∘ toSubtype) x = id x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
cases h with | intro x h => cases h exists x s
m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : SatisfiesM p x s : ρ ⊢ SatisfiesM p (x s)
no goals
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : SatisfiesM p x s : ρ ⊢ SatisfiesM p (x s) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
cases h
case intro m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x✝ : ReaderT ρ m α s : ρ x : ReaderT ρ m { a // p a } h : Subtype.val <$> x = x✝ ⊢ SatisfiesM p (x✝ s)
case intro.refl m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop s : ρ x : ReaderT ρ m { a // p a } ⊢ SatisfiesM p ((Subtype.val <$> x) s)
Please generate a tactic in lean4 to solve the state. STATE: case intro m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x✝ : ReaderT ρ m α s : ρ x : ReaderT ρ m { a // p a } h : Subtype.val <$> x = x✝ ⊢ SatisfiesM p (x✝ s) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
exists x s
case intro.refl m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop s : ρ x : ReaderT ρ m { a // p a } ⊢ SatisfiesM p ((Subtype.val <$> x) s)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop s : ρ x : ReaderT ρ m { a // p a } ⊢ SatisfiesM p ((Subtype.val <$> x) s) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
exists λ s => SubregFunctor.ensureF (f:=m) (x s) (h s)
m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) ⊢ SatisfiesM p x
m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) ⊢ (Subtype.val <$> fun s => SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s))) = x
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) ⊢ SatisfiesM p x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
funext s
m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) ⊢ (Subtype.val <$> fun s => SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s))) = x
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) s : ρ ⊢ (Subtype.val <$> fun s => SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s))) s = x s
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) ⊢ (Subtype.val <$> fun s => SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s))) = x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
dsimp [Functor.map]
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) s : ρ ⊢ (Subtype.val <$> fun s => SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s))) s = x s
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) s : ρ ⊢ Subtype.val <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s)) = x s
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) s : ρ ⊢ (Subtype.val <$> fun s => SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s))) s = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_ReaderT_eq'
[191, 1]
[199, 35]
rw [SubregFunctor.val_ensureF]
case h m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) s : ρ ⊢ Subtype.val <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s)) = x s
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝¹ : Monad m inst✝ : SubregFunctor m ρ α : Type u p : α → Prop x : ReaderT ρ m α h : ∀ (s : ρ), SatisfiesM p (x s) s : ρ ⊢ Subtype.val <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM p (x s)) = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
Prod.fst_from_to_subtype
[238, 1]
[240, 15]
funext x
α σ : Type u p : α → Prop ⊢ fstFromSubtype ∘ fstToSubtype = id
case h α σ : Type u p : α → Prop x : Subtype p × σ ⊢ (fstFromSubtype ∘ fstToSubtype) x = id x
Please generate a tactic in lean4 to solve the state. STATE: α σ : Type u p : α → Prop ⊢ fstFromSubtype ∘ fstToSubtype = id TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
Prod.fst_from_to_subtype
[238, 1]
[240, 15]
cases x
case h α σ : Type u p : α → Prop x : Subtype p × σ ⊢ (fstFromSubtype ∘ fstToSubtype) x = id x
case h.mk α σ : Type u p : α → Prop fst✝ : Subtype p snd✝ : σ ⊢ (fstFromSubtype ∘ fstToSubtype) (fst✝, snd✝) = id (fst✝, snd✝)
Please generate a tactic in lean4 to solve the state. STATE: case h α σ : Type u p : α → Prop x : Subtype p × σ ⊢ (fstFromSubtype ∘ fstToSubtype) x = id x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
Prod.fst_from_to_subtype
[238, 1]
[240, 15]
rfl
case h.mk α σ : Type u p : α → Prop fst✝ : Subtype p snd✝ : σ ⊢ (fstFromSubtype ∘ fstToSubtype) (fst✝, snd✝) = id (fst✝, snd✝)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.mk α σ : Type u p : α → Prop fst✝ : Subtype p snd✝ : σ ⊢ (fstFromSubtype ∘ fstToSubtype) (fst✝, snd✝) = id (fst✝, snd✝) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
Prod.map_val_id
[242, 1]
[244, 15]
funext x
α σ : Type u p : α → Prop ⊢ map Subtype.val id = Subtype.val ∘ fstToSubtype
case h α σ : Type u p : α → Prop x : Subtype p × σ ⊢ map Subtype.val id x = (Subtype.val ∘ fstToSubtype) x
Please generate a tactic in lean4 to solve the state. STATE: α σ : Type u p : α → Prop ⊢ map Subtype.val id = Subtype.val ∘ fstToSubtype TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
Prod.map_val_id
[242, 1]
[244, 15]
cases x
case h α σ : Type u p : α → Prop x : Subtype p × σ ⊢ map Subtype.val id x = (Subtype.val ∘ fstToSubtype) x
case h.mk α σ : Type u p : α → Prop fst✝ : Subtype p snd✝ : σ ⊢ map Subtype.val id (fst✝, snd✝) = (Subtype.val ∘ fstToSubtype) (fst✝, snd✝)
Please generate a tactic in lean4 to solve the state. STATE: case h α σ : Type u p : α → Prop x : Subtype p × σ ⊢ map Subtype.val id x = (Subtype.val ∘ fstToSubtype) x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
Prod.map_val_id
[242, 1]
[244, 15]
rfl
case h.mk α σ : Type u p : α → Prop fst✝ : Subtype p snd✝ : σ ⊢ map Subtype.val id (fst✝, snd✝) = (Subtype.val ∘ fstToSubtype) (fst✝, snd✝)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.mk α σ : Type u p : α → Prop fst✝ : Subtype p snd✝ : σ ⊢ map Subtype.val id (fst✝, snd✝) = (Subtype.val ∘ fstToSubtype) (fst✝, snd✝) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
cases h with | intro w hw => cases hw exists Prod.fstToSubtype (p:=p) <$> w s dsimp [Functor.map, StateT.map] rw [←comp_map, ←map_eq_pure_bind] apply map_congr intro x; rfl
m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : SatisfiesM p x s : ρ ⊢ SatisfiesM (fun x => p x.fst) (x s)
no goals
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : SatisfiesM p x s : ρ ⊢ SatisfiesM (fun x => p x.fst) (x s) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
cases hw
case intro m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α s : ρ w : StateT ρ m { a // p a } hw : Subtype.val <$> w = x ⊢ SatisfiesM (fun x => p x.fst) (x s)
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ SatisfiesM (fun x => p x.fst) ((Subtype.val <$> w) s)
Please generate a tactic in lean4 to solve the state. STATE: case intro m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α s : ρ w : StateT ρ m { a // p a } hw : Subtype.val <$> w = x ⊢ SatisfiesM (fun x => p x.fst) (x s) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
exists Prod.fstToSubtype (p:=p) <$> w s
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ SatisfiesM (fun x => p x.fst) ((Subtype.val <$> w) s)
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ Subtype.val <$> Prod.fstToSubtype <$> w s = (Subtype.val <$> w) s
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ SatisfiesM (fun x => p x.fst) ((Subtype.val <$> w) s) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
dsimp [Functor.map, StateT.map]
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ Subtype.val <$> Prod.fstToSubtype <$> w s = (Subtype.val <$> w) s
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ Subtype.val <$> Prod.fstToSubtype <$> w s = do let __discr ← w s pure (__discr.fst.val, __discr.snd)
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ Subtype.val <$> Prod.fstToSubtype <$> w s = (Subtype.val <$> w) s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
rw [←comp_map, ←map_eq_pure_bind]
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ Subtype.val <$> Prod.fstToSubtype <$> w s = do let __discr ← w s pure (__discr.fst.val, __discr.snd)
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ (Subtype.val ∘ Prod.fstToSubtype) <$> w s = (fun __discr => (__discr.fst.val, __discr.snd)) <$> w s
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ Subtype.val <$> Prod.fstToSubtype <$> w s = do let __discr ← w s pure (__discr.fst.val, __discr.snd) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
apply map_congr
case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ (Subtype.val ∘ Prod.fstToSubtype) <$> w s = (fun __discr => (__discr.fst.val, __discr.snd)) <$> w s
case intro.refl.h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ ∀ (a : Subtype p × ρ), (Subtype.val ∘ Prod.fstToSubtype) a = (a.fst.val, a.snd)
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ (Subtype.val ∘ Prod.fstToSubtype) <$> w s = (fun __discr => (__discr.fst.val, __discr.snd)) <$> w s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
intro x
case intro.refl.h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ ∀ (a : Subtype p × ρ), (Subtype.val ∘ Prod.fstToSubtype) a = (a.fst.val, a.snd)
case intro.refl.h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } x : Subtype p × ρ ⊢ (Subtype.val ∘ Prod.fstToSubtype) x = (x.fst.val, x.snd)
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl.h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } ⊢ ∀ (a : Subtype p × ρ), (Subtype.val ∘ Prod.fstToSubtype) a = (a.fst.val, a.snd) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
rfl
case intro.refl.h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } x : Subtype p × ρ ⊢ (Subtype.val ∘ Prod.fstToSubtype) x = (x.fst.val, x.snd)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl.h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop s : ρ w : StateT ρ m { a // p a } x : Subtype p × ρ ⊢ (Subtype.val ∘ Prod.fstToSubtype) x = (x.fst.val, x.snd) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
exists fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (h s)
m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ SatisfiesM p x
m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) = x
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ SatisfiesM p x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
apply funext
m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) = x
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ ∀ (x_1 : ρ), (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) x_1 = x x_1
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) = x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
intro s
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ ∀ (x_1 : ρ), (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) x_1 = x x_1
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) s = x s
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) ⊢ ∀ (x_1 : ρ), (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) x_1 = x x_1 TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
dsimp [Functor.map, StateT.map]
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) s = x s
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (do let __discr ← Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) pure (__discr.fst.val, __discr.snd)) = x s
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (Subtype.val <$> fun s => Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s))) s = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
rw [←map_eq_pure_bind, ←comp_map]
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (do let __discr ← Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) pure (__discr.fst.val, __discr.snd)) = x s
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ ((fun __discr => (__discr.fst.val, __discr.snd)) ∘ Prod.fstFromSubtype) <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (do let __discr ← Prod.fstFromSubtype <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) pure (__discr.fst.val, __discr.snd)) = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
conv => lhs; lhs; ext as; dsimp [Prod.map]; change as.val
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ ((fun __discr => (__discr.fst.val, __discr.snd)) ∘ Prod.fstFromSubtype) <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (fun as => as.val) <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ ((fun __discr => (__discr.fst.val, __discr.snd)) ∘ Prod.fstFromSubtype) <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
conv => lhs; lhs; change Subtype.val
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (fun as => as.val) <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ Subtype.val <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ (fun as => as.val) <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
SatisfiesM_StateT_eq'
[246, 1]
[263, 41]
rw [SubregFunctor.val_ensureF (x s)]
case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ Subtype.val <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h m : Type u → Type v inst✝² : Monad m inst✝¹ : LawfulMonad m inst✝ : SubregFunctor m α ρ : Type u p : α → Prop x : StateT ρ m α h : ∀ (s : ρ), SatisfiesM (fun x => p x.fst) (x s) s : ρ ⊢ Subtype.val <$> SubregFunctor.ensureF (x s) (_ : SatisfiesM (fun x => p x.fst) (x s)) = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
cases hx with | intro w hw => cases hw dsimp [Functor.map, EStateM.map] cases w s <;> intro h case ok a s' => exact (Result.ok.inj h).left ▸ a.property case error e s' => cases h
ε σ α : Type u p : α → Prop x : EStateM ε σ α hx : SatisfiesM p x s : σ a : α x✝ : σ ⊢ x s = Result.ok a x✝ → p a
no goals
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop x : EStateM ε σ α hx : SatisfiesM p x s : σ a : α x✝ : σ ⊢ x s = Result.ok a x✝ → p a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
cases hw
case intro ε σ α : Type u p : α → Prop x : EStateM ε σ α s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } hw : Subtype.val <$> w = x ⊢ x s = Result.ok a x✝ → p a
case intro.refl ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } ⊢ (Subtype.val <$> w) s = Result.ok a x✝ → p a
Please generate a tactic in lean4 to solve the state. STATE: case intro ε σ α : Type u p : α → Prop x : EStateM ε σ α s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } hw : Subtype.val <$> w = x ⊢ x s = Result.ok a x✝ → p a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
dsimp [Functor.map, EStateM.map]
case intro.refl ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } ⊢ (Subtype.val <$> w) s = Result.ok a x✝ → p a
case intro.refl ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } ⊢ (match w s with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ → p a
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } ⊢ (Subtype.val <$> w) s = Result.ok a x✝ → p a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
cases w s <;> intro h
case intro.refl ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } ⊢ (match w s with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ → p a
case intro.refl.ok ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } a✝¹ : { a // p a } a✝ : σ h : (match Result.ok a✝¹ a✝ with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ ⊢ p a case intro.refl.error ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } a✝¹ : ε a✝ : σ h : (match Result.error a✝¹ a✝ with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ ⊢ p a
Please generate a tactic in lean4 to solve the state. STATE: case intro.refl ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } ⊢ (match w s with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ → p a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
case ok a s' => exact (Result.ok.inj h).left ▸ a.property
ε σ α : Type u p : α → Prop s : σ a✝ : α x✝ : σ w : EStateM ε σ { a // p a } a : { a // p a } s' : σ h : (match Result.ok a s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a✝ x✝ ⊢ p a✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop s : σ a✝ : α x✝ : σ w : EStateM ε σ { a // p a } a : { a // p a } s' : σ h : (match Result.ok a s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a✝ x✝ ⊢ p a✝ TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
case error e s' => cases h
ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } e : ε s' : σ h : (match Result.error e s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ ⊢ p a
no goals
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } e : ε s' : σ h : (match Result.error e s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ ⊢ p a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
exact (Result.ok.inj h).left ▸ a.property
ε σ α : Type u p : α → Prop s : σ a✝ : α x✝ : σ w : EStateM ε σ { a // p a } a : { a // p a } s' : σ h : (match Result.ok a s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a✝ x✝ ⊢ p a✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop s : σ a✝ : α x✝ : σ w : EStateM ε σ { a // p a } a : { a // p a } s' : σ h : (match Result.ok a s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a✝ x✝ ⊢ p a✝ TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
cases h
ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } e : ε s' : σ h : (match Result.error e s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ ⊢ p a
no goals
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop s : σ a : α x✝ : σ w : EStateM ε σ { a // p a } e : ε s' : σ h : (match Result.error e s' with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = Result.ok a x✝ ⊢ p a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
exists λ s => (x s).zipProof (h s)
ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a ⊢ SatisfiesM p x
ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a ⊢ (Subtype.val <$> fun s => Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a)) = x
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a ⊢ SatisfiesM p x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
funext s
ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a ⊢ (Subtype.val <$> fun s => Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a)) = x
case h ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a s : σ ⊢ (Subtype.val <$> fun s => Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a)) s = x s
Please generate a tactic in lean4 to solve the state. STATE: ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a ⊢ (Subtype.val <$> fun s => Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a)) = x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
dsimp [Functor.map, EStateM.map]
case h ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a s : σ ⊢ (Subtype.val <$> fun s => Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a)) s = x s
case h ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a s : σ ⊢ (match Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a) with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = x s
Please generate a tactic in lean4 to solve the state. STATE: case h ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a s : σ ⊢ (Subtype.val <$> fun s => Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a)) s = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Functor/Subreg.lean
EStateM.SatisfiesM_EStateM_eq
[315, 1]
[329, 35]
conv => lhs; change Result.map (Subtype.val (p:=p)) ((x s).zipProof (h s)) rw [Result.map_val_zipProof]
case h ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a s : σ ⊢ (match Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a) with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = x s
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h ε σ α : Type u p : α → Prop x : EStateM ε σ α h : ∀ (s : σ) (a : α) (s' : σ), x s = Result.ok a s' → p a s : σ ⊢ (match Result.zipProof (x s) (_ : ∀ (a : α) (s' : σ), x s = Result.ok a s' → p a) with | Result.ok a s => Result.ok a.val s | Result.error e s => Result.error e s) = x s TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Reify.lean
SubtypeT.deq_of_iff
[76, 1]
[84, 17]
have : p = q := funext (λ a => propext (hpq a))
m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p q : Pred α hpq : ∀ (a : α), p a ↔ q a ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → q a) x)
m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p q : Pred α hpq : ∀ (a : α), p a ↔ q a this : p = q ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → q a) x)
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p q : Pred α hpq : ∀ (a : α), p a ↔ q a ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → q a) x) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Reify.lean
SubtypeT.deq_of_iff
[76, 1]
[84, 17]
cases this
m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p q : Pred α hpq : ∀ (a : α), p a ↔ q a this : p = q ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → q a) x)
case refl m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → p a) x)
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p q : Pred α hpq : ∀ (a : α), p a ↔ q a this : p = q ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → q a) x) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Reify.lean
SubtypeT.deq_of_iff
[76, 1]
[84, 17]
intro x
case refl m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → p a) x)
case refl m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → p a) x)
Please generate a tactic in lean4 to solve the state. STATE: case refl m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a ⊢ ∀ (x : SubtypeT m α p), DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → p a) x) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Reify.lean
SubtypeT.deq_of_iff
[76, 1]
[84, 17]
apply DEq.deq_of_eq
case refl m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → p a) x)
case refl.a m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ x = weaken (_ : ∀ (a : α), p a → p a) x
Please generate a tactic in lean4 to solve the state. STATE: case refl m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ DEq (SubtypeT m α) x (weaken (_ : ∀ (a : α), p a → p a) x) TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Reify.lean
SubtypeT.deq_of_iff
[76, 1]
[84, 17]
conv => rhs; dsimp [weaken]; congr . skip . ext a; change pure a
case refl.a m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ x = weaken (_ : ∀ (a : α), p a → p a) x
case refl.a m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ x = do let a ← x pure a
Please generate a tactic in lean4 to solve the state. STATE: case refl.a m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ x = weaken (_ : ∀ (a : α), p a → p a) x TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Reify.lean
SubtypeT.deq_of_iff
[76, 1]
[84, 17]
rw [bind_pure]
case refl.a m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ x = do let a ← x pure a
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refl.a m : Type u → Type v inst✝¹ : Monad m inst✝ : LawfulMonad m α : Type u p : Pred α hpq : ∀ (a : α), p a ↔ p a x : SubtypeT m α p ⊢ x = do let a ← x pure a TACTIC:
https://github.com/Junology/dijkstra.git
81543f27ea34811910c10871ecf7e6243f952b19
Dijkstra/Control/Monad/Hom.lean
MonadHom.ext
[43, 1]
[46, 12]
apply MonadHom.eq (m:=m)
m : Type u → Type v inst✝¹ : Monad m n : Type u → Type w inst✝ : Monad n F G : MonadHom m n h : ∀ {α : Type u} (x : m α), app F x = app G x ⊢ F = G
m : Type u → Type v inst✝¹ : Monad m n : Type u → Type w inst✝ : Monad n F G : MonadHom m n h : ∀ {α : Type u} (x : m α), app F x = app G x ⊢ F.app = G.app
Please generate a tactic in lean4 to solve the state. STATE: m : Type u → Type v inst✝¹ : Monad m n : Type u → Type w inst✝ : Monad n F G : MonadHom m n h : ∀ {α : Type u} (x : m α), app F x = app G x ⊢ F = G TACTIC: