tasksource/leandojo huggingface dataset:
Theorem: Relation.TransGen.trans_right
File: Mathlib/Logic/Relation.lean

tactic: induction hbc
state_before: α : Type u_1
β : Type ?u.20625
γ : Type ?u.20628
δ : Type ?u.20631
r : α → α → Prop
a b c d : α
hab : ReflTransGen r a b
hbc : TransGen r b c
⊢ TransGen r a c

tactic: case single c hbc => exact tail' hab hbc
state_before: case single
α : Type u_1
β : Type ?u.20625
γ : Type ?u.20628
δ : Type ?u.20631
r : α → α → Prop
a b c d : α
hab : ReflTransGen r a b
b✝ : α
a✝ : r b b✝
⊢ TransGen r a b✝

case tail
α : Type u_1
β : Type ?u.20625
γ : Type ?u.20628
δ : Type ?u.20631
r : α → α → Prop
a b c d : α
hab : ReflTransGen r a b
b✝ c✝ : α
a✝¹ : TransGen r b b✝
a✝ : r b✝ c✝
a_ih✝ : TransGen r a b✝
⊢ TransGen r a c✝

tactic: case tail c d _ hcd hac => exact hac.tail hcd
state_before: case tail
α : Type u_1
β : Type ?u.20625
γ : Type ?u.20628
δ : Type ?u.20631
r : α → α → Prop
a b c d : α
hab : ReflTransGen r a b
b✝ c✝ : α
a✝¹ : TransGen r b b✝
a✝ : r b✝ c✝
a_ih✝ : TransGen r a b✝
⊢ TransGen r a c✝

tactic: exact tail' hab hbc
state_before: α : Type u_1
β : Type ?u.20625
γ : Type ?u.20628
δ : Type ?u.20631
r : α → α → Prop
a b c✝ d : α
hab : ReflTransGen r a b
c : α
hbc : r b c
⊢ TransGen r a c

tactic: exact hac.tail hcd
state_before: α : Type u_1
β : Type ?u.20625
γ : Type ?u.20628
δ : Type ?u.20631
r : α → α → Prop
a b c✝ d✝ : α
hab : ReflTransGen r a b
c d : α
a✝ : TransGen r b c
hcd : r c d
hac : TransGen r a c
⊢ TransGen r a d
Theorem: pow_le_pow_of_le_one_aux
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: simp
state_before: α : Type ?u.301195
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : StrictOrderedSemiring R
a : R
h : 0 ≤ a
ha : a ≤ 1
i : ℕ
⊢ a ^ (i + 0) ≤ a ^ i

tactic: rw [← add_assoc, ← one_mul (a ^ i), pow_succ]
state_before: α : Type ?u.301195
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : StrictOrderedSemiring R
a : R
h : 0 ≤ a
ha : a ≤ 1
i k : ℕ
⊢ a ^ (i + (k + 1)) ≤ a ^ i

tactic: exact mul_le_mul ha (pow_le_pow_of_le_one_aux h ha _ _) (pow_nonneg h _) zero_le_one
state_before: α : Type ?u.301195
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : StrictOrderedSemiring R
a : R
h : 0 ≤ a
ha : a ≤ 1
i k : ℕ
⊢ a * a ^ (i + k) ≤ 1 * a ^ i
Theorem: CategoryTheory.Limits.CompleteLattice.prod_eq_inf
File: Mathlib/CategoryTheory/Limits/Lattice.lean

tactic: rw [finite_limit_eq_finset_univ_inf (pair.{u} x y)]
state_before: α : Type u
J : Type w
inst✝³ : SmallCategory J
inst✝² : FinCategory J
inst✝¹ : SemilatticeInf α
inst✝ : OrderTop α
x y : α
⊢ limit (pair x y) = Finset.inf Finset.univ (pair x y).toPrefunctor.obj

tactic: rw [inf_top_eq]
state_before: α : Type u
J : Type w
inst✝³ : SmallCategory J
inst✝² : FinCategory J
inst✝¹ : SemilatticeInf α
inst✝ : OrderTop α
x y : α
⊢ x ⊓ (y ⊓ ⊤) = x ⊓ y
Theorem: FreeGroup.reduce_invRev
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: apply reduce.min
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
w : List (α × Bool)
⊢ reduce (invRev w) = invRev (reduce w)

tactic: rw [← red_invRev_iff, invRev_invRev]
state_before: case H
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
w : List (α × Bool)
⊢ Red (reduce (invRev w)) (invRev (reduce w))

tactic: apply Red.reduce_left
state_before: case H
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
w : List (α × Bool)
⊢ Red (invRev (reduce (invRev w))) (reduce w)

tactic: have : Red (invRev (invRev w)) (invRev (reduce (invRev w))) := reduce.red.invRev
state_before: case H.h
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
w : List (α × Bool)
⊢ Red w (invRev (reduce (invRev w)))

tactic: rwa [invRev_invRev] at this
state_before: case H.h
α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
w : List (α × Bool)
this : Red (invRev (invRev w)) (invRev (reduce (invRev w)))
⊢ Red w (invRev (reduce (invRev w)))
Theorem: Set.preimage_mul_left_one'
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simp
state_before: F : Type ?u.133358
α : Type u_1
β : Type ?u.133364
γ : Type ?u.133367
inst✝ : Group α
s t : Set α
a b : α
⊢ (fun b => a⁻¹ * b) ⁻¹' 1 = {a}
Theorem: PNat.coprime_coe
File: Mathlib/Data/PNat/Prime.lean

tactic: unfold coprime Coprime
state_before: m n : ℕ+
⊢ coprime ↑m ↑n ↔ Coprime m n

tactic: rw [← coe_inj]
state_before: m n : ℕ+
⊢ Nat.gcd ↑m ↑n = 1 ↔ gcd m n = 1

tactic: simp
state_before: m n : ℕ+
⊢ Nat.gcd ↑m ↑n = 1 ↔ ↑(gcd m n) = ↑1
Theorem: PGame.relabel_moveLeft
File: Mathlib/SetTheory/Game/PGame.lean

tactic: simp
state_before: x : PGame
xl' xr' : Type u_1
el : xl' ≃ LeftMoves x
er : xr' ≃ RightMoves x
i : LeftMoves x
⊢ moveLeft (relabel el er) (↑el.symm i) = moveLeft x i
Theorem: Ordinal.sup_mul_nat
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rcases eq_zero_or_pos o with (rfl | ho)
state_before: o : Ordinal
⊢ (sup fun n => o * ↑n) = o * ω

tactic: rw [zero_mul]
state_before: case inl

⊢ (sup fun n => 0 * ↑n) = 0 * ω

tactic: exact sup_eq_zero_iff.2 fun n => zero_mul (n : Ordinal)
state_before: case inl

⊢ (sup fun n => 0 * ↑n) = 0

tactic: exact (mul_isNormal ho).apply_omega
state_before: case inr
o : Ordinal
ho : 0 < o
⊢ (sup fun n => o * ↑n) = o * ω
Theorem: OrderHom.id_comp
File: Mathlib/Order/Hom/Basic.lean

tactic: ext
state_before: F : Type ?u.47604
α : Type u_1
β : Type u_2
γ : Type ?u.47613
δ : Type ?u.47616
inst✝³ : Preorder α
inst✝² : Preorder β
inst✝¹ : Preorder γ
inst✝ : Preorder δ
f : α →o β
⊢ comp id f = f

tactic: rfl
state_before: case h.h
F : Type ?u.47604
α : Type u_1
β : Type u_2
γ : Type ?u.47613
δ : Type ?u.47616
inst✝³ : Preorder α
inst✝² : Preorder β
inst✝¹ : Preorder γ
inst✝ : Preorder δ
f : α →o β
x✝ : α
⊢ ↑(comp id f) x✝ = ↑f x✝
Theorem: Set.preimage_invFun_of_not_mem
File: Mathlib/Data/Set/Function.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.70004
ι : Sort ?u.70007
π : α → Type ?u.70012
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : ¬Classical.choice n ∈ s
⊢ Function.invFun f ⁻¹' s = f '' s

tactic: rcases em (x ∈ range f) with (⟨a, rfl⟩ | hx)
state_before: case h
α : Type u_1
β : Type u_2
γ : Type ?u.70004
ι : Sort ?u.70007
π : α → Type ?u.70012
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : ¬Classical.choice n ∈ s
x : β
⊢ x ∈ Function.invFun f ⁻¹' s ↔ x ∈ f '' s

tactic: rw [mem_preimage, leftInverse_invFun hf, hf.mem_set_image]
state_before: case h.inl.intro
α : Type u_1
β : Type u_2
γ : Type ?u.70004
ι : Sort ?u.70007
π : α → Type ?u.70012
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : ¬Classical.choice n ∈ s
a : α
⊢ f a ∈ Function.invFun f ⁻¹' s ↔ f a ∈ f '' s

tactic: have : x ∉ f '' s := fun h' => hx (image_subset_range _ _ h')
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type ?u.70004
ι : Sort ?u.70007
π : α → Type ?u.70012
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : ¬Classical.choice n ∈ s
x : β
hx : ¬x ∈ range f
⊢ x ∈ Function.invFun f ⁻¹' s ↔ x ∈ f '' s

tactic: simp only [mem_preimage, invFun_neg hx, h, this]
state_before: case h.inr
α : Type u_1
β : Type u_2
γ : Type ?u.70004
ι : Sort ?u.70007
π : α → Type ?u.70012
s✝ s₁ s₂ : Set α
t : Set β
f✝ : α → β
n : Nonempty α
f : α → β
hf : Injective f
s : Set α
h : ¬Classical.choice n ∈ s
x : β
hx : ¬x ∈ range f
this : ¬x ∈ f '' s
⊢ x ∈ Function.invFun f ⁻¹' s ↔ x ∈ f '' s
Theorem: UpperSet.symm_map
File: Mathlib/Order/UpperLower/Basic.lean

tactic: convert Set.preimage_equiv_eq_image_symm s f.toEquiv
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.93130
ι : Sort ?u.93133
κ : ι → Sort ?u.93138
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f✝ : α ≃o β
s✝ t : UpperSet α
a : α
b : β
f : α ≃o β
s : UpperSet β
⊢ ↑(↑(OrderIso.symm (map f)) s) = ↑(↑(map (OrderIso.symm f)) s)
Theorem: IsClosed.lowerSemicontinuous_indicator
File: Mathlib/Topology/Semicontinuous.lean

tactic: intro x z hz
state_before: α : Type u_1
inst✝² : TopologicalSpace α
β : Type u_2
inst✝¹ : Preorder β
f g : α → β
x : α
s t : Set α
y z : β
inst✝ : Zero β
hs : IsClosed s
hy : y ≤ 0
⊢ LowerSemicontinuous (indicator s fun _x => y)

tactic: by_cases h : x ∈ s <;> simp [h] at hz
state_before: α : Type u_1
inst✝² : TopologicalSpace α
β : Type u_2
inst✝¹ : Preorder β
f g : α → β
x✝ : α
s t : Set α
y z✝ : β
inst✝ : Zero β
hs : IsClosed s
hy : y ≤ 0
x : α
z : β
hz : z < indicator s (fun _x => y) x
⊢ ∀ᶠ (x' : α) in 𝓝 x, z < indicator s (fun _x => y) x'

tactic: refine Filter.eventually_of_forall fun x' => ?_
state_before: case pos
α : Type u_1
inst✝² : TopologicalSpace α
β : Type u_2
inst✝¹ : Preorder β
f g : α → β
x✝ : α
s t : Set α
y z✝ : β
inst✝ : Zero β
hs : IsClosed s
hy : y ≤ 0
x : α
z : β
h : x ∈ s
hz : z < y
⊢ ∀ᶠ (x' : α) in 𝓝 x, z < indicator s (fun _x => y) x'

tactic: by_cases h' : x' ∈ s <;> simp [h', hz, hz.trans_le hy]
state_before: case pos
α : Type u_1
inst✝² : TopologicalSpace α
β : Type u_2
inst✝¹ : Preorder β
f g : α → β
x✝ : α
s t : Set α
y z✝ : β
inst✝ : Zero β
hs : IsClosed s
hy : y ≤ 0
x : α
z : β
h : x ∈ s
hz : z < y
x' : α
⊢ z < indicator s (fun _x => y) x'

tactic: filter_upwards [hs.isOpen_compl.mem_nhds h]
state_before: case neg
α : Type u_1
inst✝² : TopologicalSpace α
β : Type u_2
inst✝¹ : Preorder β
f g : α → β
x✝ : α
s t : Set α
y z✝ : β
inst✝ : Zero β
hs : IsClosed s
hy : y ≤ 0
x : α
z : β
h : ¬x ∈ s
hz : z < 0
⊢ ∀ᶠ (x' : α) in 𝓝 x, z < indicator s (fun _x => y) x'

tactic: simp (config := { contextual := true }) [hz]
state_before: case h
α : Type u_1
inst✝² : TopologicalSpace α
β : Type u_2
inst✝¹ : Preorder β
f g : α → β
x✝ : α
s t : Set α
y z✝ : β
inst✝ : Zero β
hs : IsClosed s
hy : y ≤ 0
x : α
z : β
h : ¬x ∈ s
hz : z < 0
⊢ ∀ (a : α), a ∈ sᶜ → z < indicator s (fun _x => y) a
Theorem: Multiset.strongDownwardInductionOn_eq
File: Mathlib/Data/Multiset/Basic.lean

tactic: dsimp only [strongDownwardInductionOn]
state_before: α : Type u_1
β : Type ?u.82569
γ : Type ?u.82572
p : Multiset α → Sort u_2
s : Multiset α
n : ℕ
H : (t₁ : Multiset α) → ({t₂ : Multiset α} → ↑card t₂ ≤ n → t₁ < t₂ → p t₂) → ↑card t₁ ≤ n → p t₁
⊢ (fun a => strongDownwardInductionOn s H a) = H s fun {t} ht _h => strongDownwardInductionOn t H ht

tactic: rw [strongDownwardInduction]
state_before: α : Type u_1
β : Type ?u.82569
γ : Type ?u.82572
p : Multiset α → Sort u_2
s : Multiset α
n : ℕ
H : (t₁ : Multiset α) → ({t₂ : Multiset α} → ↑card t₂ ≤ n → t₁ < t₂ → p t₂) → ↑card t₁ ≤ n → p t₁
⊢ (fun a => strongDownwardInduction H s a) = H s fun {t} ht _h => strongDownwardInduction H t ht
Theorem: eq_orthogonalProjection_of_eq_submodule
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: change orthogonalProjectionFn K u = orthogonalProjectionFn K' u
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.508885
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝¹ : CompleteSpace { x // x ∈ K }
K' : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K' }
h : K = K'
u : E
⊢ ↑(↑(orthogonalProjection K) u) = ↑(↑(orthogonalProjection K') u)

tactic: congr
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.508885
inst✝⁶ : IsROrC 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace 𝕜 E
inst✝² : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝¹ : CompleteSpace { x // x ∈ K }
K' : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K' }
h : K = K'
u : E
⊢ orthogonalProjectionFn K u = orthogonalProjectionFn K' u
Theorem: Set.toFinset_inj
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← s.coe_toFinset, h, t.coe_toFinset]
state_before: α : Type u_1
β : Type ?u.81885
γ : Type ?u.81888
s✝ t✝ s t : Set α
inst✝¹ : Fintype ↑s
inst✝ : Fintype ↑t
h : toFinset s = toFinset t
⊢ s = t

tactic: simp [h]
state_before: α : Type u_1
β : Type ?u.81885
γ : Type ?u.81888
s✝ t✝ s t : Set α
inst✝¹ : Fintype ↑s
inst✝ : Fintype ↑t
h : s = t
⊢ toFinset s = toFinset t
Theorem: inv_neg
File: Mathlib/Algebra/Field/Basic.lean

tactic: rw [neg_inv]
state_before: α : Type ?u.36358
β : Type ?u.36361
K : Type u_1
inst✝¹ : DivisionMonoid K
inst✝ : HasDistribNeg K
a b : K
⊢ (-a)⁻¹ = -a⁻¹
Theorem: fderivWithin_sub_const
File: Mathlib/Analysis/Calculus/FDeriv/Add.lean

tactic: simp only [sub_eq_add_neg, fderivWithin_add_const hxs]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.519519
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.519614
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
hxs : UniqueDiffWithinAt 𝕜 s x
c : F
⊢ fderivWithin 𝕜 (fun y => f y - c) s x = fderivWithin 𝕜 f s x
Theorem: map_dualTensorHom
File: Mathlib/LinearAlgebra/Contraction.lean

tactic: ext (m n)
state_before: ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹⁰ : CommSemiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid Q
inst✝⁵ : Module R M
inst✝⁴ : Module R N
inst✝³ : Module R P
inst✝² : Module R Q
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
f : Dual R M
p : P
g : Dual R N
q : Q
⊢ TensorProduct.map (↑(dualTensorHom R M P) (f ⊗ₜ[R] p)) (↑(dualTensorHom R N Q) (g ⊗ₜ[R] q)) =
    ↑(dualTensorHom R (M ⊗[R] N) (P ⊗[R] Q)) (↑(dualDistrib R M N) (f ⊗ₜ[R] g) ⊗ₜ[R] p ⊗ₜ[R] q)

tactic: simp only [compr₂_apply, mk_apply, map_tmul, dualTensorHom_apply, dualDistrib_apply, ←
  smul_tmul_smul]
state_before: case H.h.h
ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹⁰ : CommSemiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid Q
inst✝⁵ : Module R M
inst✝⁴ : Module R N
inst✝³ : Module R P
inst✝² : Module R Q
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
f : Dual R M
p : P
g : Dual R N
q : Q
m : M
n : N
⊢ ↑(↑(compr₂ (TensorProduct.mk R M N)
              (TensorProduct.map (↑(dualTensorHom R M P) (f ⊗ₜ[R] p)) (↑(dualTensorHom R N Q) (g ⊗ₜ[R] q))))
          m)
      n =
    ↑(↑(compr₂ (TensorProduct.mk R M N)
              (↑(dualTensorHom R (M ⊗[R] N) (P ⊗[R] Q)) (↑(dualDistrib R M N) (f ⊗ₜ[R] g) ⊗ₜ[R] p ⊗ₜ[R] q)))
          m)
      n
Theorem: padicNormE.add_eq_max_of_ne
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: dsimp [norm] at h⊢
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ_[p]
h : ‖q‖ ≠ ‖r‖
⊢ ‖q + r‖ = max ‖q‖ ‖r‖

tactic: have : padicNormE q ≠ padicNormE r := by exact_mod_cast h
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ_[p]
h : ¬↑(↑padicNormE q) = ↑(↑padicNormE r)
⊢ ↑(↑padicNormE (q + r)) = max ↑(↑padicNormE q) ↑(↑padicNormE r)

tactic: exact_mod_cast add_eq_max_of_ne' this
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ_[p]
h : ¬↑(↑padicNormE q) = ↑(↑padicNormE r)
this : ↑padicNormE q ≠ ↑padicNormE r
⊢ ↑(↑padicNormE (q + r)) = max ↑(↑padicNormE q) ↑(↑padicNormE r)

tactic: exact_mod_cast h
state_before: p : ℕ
hp : Fact (Nat.Prime p)
q r : ℚ_[p]
h : ¬↑(↑padicNormE q) = ↑(↑padicNormE r)
⊢ ↑padicNormE q ≠ ↑padicNormE r
Theorem: List.sigma_eq_sigmaTR
File: Std/Data/List/Basic.lean

tactic: funext α β l₁ l₂
state_before: ⊢ @List.sigma = @sigmaTR

tactic: simp [List.sigma, sigmaTR]
state_before: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ List.sigma l₁ l₂ = sigmaTR l₁ l₂

tactic: rw [Array.foldl_data_eq_bind]
state_before: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ (List.bind l₁ fun a => map (Sigma.mk a) (l₂ a)) =
    (foldl (fun acc a => foldl (fun acc b => Array.push acc { fst := a, snd := b }) acc (l₂ a)) #[] l₁).data

tactic: rfl
state_before: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ (List.bind l₁ fun a => map (Sigma.mk a) (l₂ a)) = #[].data ++ List.bind l₁ ?h.h.h.h.G

case h.h.h.h.G
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ α → List ((a : α) × β a)

case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ ∀ (acc : Array ((a : α) × β a)) (a : α),
    (foldl (fun acc b => Array.push acc { fst := a, snd := b }) acc (l₂ a)).data = acc.data ++ ?h.h.h.h.G a

tactic: intros
state_before: case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ ∀ (acc : Array ((a : α) × β a)) (a : α),
    (foldl (fun acc b => Array.push acc { fst := a, snd := b }) acc (l₂ a)).data = acc.data ++ map (Sigma.mk a) (l₂ a)

tactic: apply Array.foldl_data_eq_map
state_before: case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
acc✝ : Array ((a : α) × β a)
a✝ : α
⊢ (foldl (fun acc b => Array.push acc { fst := a✝, snd := b }) acc✝ (l₂ a✝)).data =
    acc✝.data ++ map (Sigma.mk a✝) (l₂ a✝)
Theorem: ProjectiveSpectrum.vanishingIdeal_closure
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: have := (gc_ideal 𝒜).u_l_u_eq_u t
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
⊢ vanishingIdeal (closure t) = vanishingIdeal t

tactic: dsimp only at this
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
this :
  HomogeneousIdeal.toIdeal (vanishingIdeal (zeroLocus 𝒜 ↑(HomogeneousIdeal.toIdeal (vanishingIdeal t)))) =
    HomogeneousIdeal.toIdeal (vanishingIdeal t)
⊢ vanishingIdeal (closure t) = vanishingIdeal t

tactic: ext1
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
this :
  HomogeneousIdeal.toIdeal (vanishingIdeal (zeroLocus 𝒜 ↑(HomogeneousIdeal.toIdeal (vanishingIdeal t)))) =
    HomogeneousIdeal.toIdeal (vanishingIdeal t)
⊢ vanishingIdeal (closure t) = vanishingIdeal t

tactic: erw [zeroLocus_vanishingIdeal_eq_closure 𝒜 t] at this
state_before: case h
R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
this :
  HomogeneousIdeal.toIdeal (vanishingIdeal (zeroLocus 𝒜 ↑(HomogeneousIdeal.toIdeal (vanishingIdeal t)))) =
    HomogeneousIdeal.toIdeal (vanishingIdeal t)
⊢ HomogeneousIdeal.toIdeal (vanishingIdeal (closure t)) = HomogeneousIdeal.toIdeal (vanishingIdeal t)

tactic: exact this
state_before: case h
R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
t : Set (ProjectiveSpectrum 𝒜)
this : HomogeneousIdeal.toIdeal (vanishingIdeal (closure t)) = HomogeneousIdeal.toIdeal (vanishingIdeal t)
⊢ HomogeneousIdeal.toIdeal (vanishingIdeal (closure t)) = HomogeneousIdeal.toIdeal (vanishingIdeal t)
Theorem: AffineSubspace.map_eq_bot_iff
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: refine' ⟨fun h => _, fun h => _⟩
state_before: k : Type u_1
V₁ : Type u_2
P₁ : Type u_3
V₂ : Type u_5
P₂ : Type u_4
V₃ : Type ?u.555099
P₃ : Type ?u.555102
inst✝⁹ : Ring k
inst✝⁸ : AddCommGroup V₁
inst✝⁷ : Module k V₁
inst✝⁶ : AffineSpace V₁ P₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module k V₂
inst✝³ : AffineSpace V₂ P₂
inst✝² : AddCommGroup V₃
inst✝¹ : Module k V₃
inst✝ : AffineSpace V₃ P₃
f : P₁ →ᵃ[k] P₂
s : AffineSubspace k P₁
⊢ map f s = ⊥ ↔ s = ⊥

tactic: rwa [← coe_eq_bot_iff, coe_map, image_eq_empty, coe_eq_bot_iff] at h
state_before: case refine'_1
k : Type u_1
V₁ : Type u_2
P₁ : Type u_3
V₂ : Type u_5
P₂ : Type u_4
V₃ : Type ?u.555099
P₃ : Type ?u.555102
inst✝⁹ : Ring k
inst✝⁸ : AddCommGroup V₁
inst✝⁷ : Module k V₁
inst✝⁶ : AffineSpace V₁ P₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module k V₂
inst✝³ : AffineSpace V₂ P₂
inst✝² : AddCommGroup V₃
inst✝¹ : Module k V₃
inst✝ : AffineSpace V₃ P₃
f : P₁ →ᵃ[k] P₂
s : AffineSubspace k P₁
h : map f s = ⊥
⊢ s = ⊥

tactic: rw [h, map_bot]
state_before: case refine'_2
k : Type u_1
V₁ : Type u_2
P₁ : Type u_3
V₂ : Type u_5
P₂ : Type u_4
V₃ : Type ?u.555099
P₃ : Type ?u.555102
inst✝⁹ : Ring k
inst✝⁸ : AddCommGroup V₁
inst✝⁷ : Module k V₁
inst✝⁶ : AffineSpace V₁ P₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module k V₂
inst✝³ : AffineSpace V₂ P₂
inst✝² : AddCommGroup V₃
inst✝¹ : Module k V₃
inst✝ : AffineSpace V₃ P₃
f : P₁ →ᵃ[k] P₂
s : AffineSubspace k P₁
h : s = ⊥
⊢ map f s = ⊥
Theorem: List.eq_iff_join_eq
File: Mathlib/Data/List/Join.lean

tactic: refine' ⟨fun H => by simp [H], _⟩
state_before: α : Type u_1
β : Type ?u.15921
L L' : List (List α)
⊢ L = L' ↔ join L = join L' ∧ map length L = map length L'

tactic: rintro ⟨join_eq, length_eq⟩
state_before: α : Type u_1
β : Type ?u.15921
L L' : List (List α)
⊢ join L = join L' ∧ map length L = map length L' → L = L'

tactic: apply ext_get
state_before: case intro
α : Type u_1
β : Type ?u.15921
L L' : List (List α)
join_eq : join L = join L'
length_eq : map length L = map length L'
⊢ L = L'

tactic: simp [H]
state_before: α : Type u_1
β : Type ?u.15921
L L' : List (List α)
H : L = L'
⊢ join L = join L' ∧ map length L = map length L'

tactic: have : length (map length L) = length (map length L') := by rw [length_eq]
state_before: case intro.hl
α : Type u_1
β : Type ?u.15921
L L' : List (List α)
join_eq : join L = join L'
length_eq : map length L = map length L'
⊢ length L = length L'

tactic: simpa using this
state_before: case intro.hl
α : Type u_1
β : Type ?u.15921
L L' : List (List α)
join_eq : join L = join L'
length_eq : map length L = map length L'
this : length (map length L) = length (map length L')
⊢ length L = length L'

tactic: rw [length_eq]
state_before: α : Type u_1
β : Type ?u.15921
L L' : List (List α)
join_eq : join L = join L'
length_eq : map length L = map length L'
⊢ length (map length L) = length (map length L')

tactic: intro n h₁ h₂
state_before: case intro.h
α : Type u_1
β : Type ?u.15921
L L' : List (List α)
join_eq : join L = join L'
length_eq : map length L = map length L'
⊢ ∀ (n : ℕ) (h₁ : n < length L) (h₂ : n < length L'), get L { val := n, isLt := h₁ } = get L' { val := n, isLt := h₂ }

tactic: rw [← drop_take_succ_join_eq_get, ← drop_take_succ_join_eq_get, join_eq, length_eq]
state_before: case intro.h
α : Type u_1
β : Type ?u.15921
L L' : List (List α)
join_eq : join L = join L'
length_eq : map length L = map length L'
n : ℕ
h₁ : n < length L
h₂ : n < length L'
⊢ get L { val := n, isLt := h₁ } = get L' { val := n, isLt := h₂ }
Theorem: iSup_eq_dif
File: Mathlib/Order/CompleteLattice.lean

tactic: by_cases h : p <;> simp [h]
state_before: α : Type u_1
β : Type ?u.92752
β₂ : Type ?u.92755
γ : Type ?u.92758
ι : Sort ?u.92761
ι' : Sort ?u.92764
κ : ι → Sort ?u.92769
κ' : ι' → Sort ?u.92774
inst✝¹ : CompleteLattice α
f g s t : ι → α
a✝ b : α
p : Prop
inst✝ : Decidable p
a : p → α
⊢ (⨆ (h : p), a h) = if h : p then a h else ⊥
Theorem: Computation.le_stable
File: Mathlib/Data/Seq/Computation.lean

tactic: cases' s with f al
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
a : α
m n : ℕ
h : m ≤ n
⊢ ↑s m = some a → ↑s n = some a

tactic: induction' h with n _ IH
state_before: case mk
α : Type u
β : Type v
γ : Type w
a : α
m n : ℕ
h : m ≤ n
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } n = some a

tactic: exacts [id, fun h2 => al (IH h2)]
state_before: case mk.refl
α : Type u
β : Type v
γ : Type w
a : α
m n : ℕ
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
⊢ ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } m = some a

case mk.step
α : Type u
β : Type v
γ : Type w
a : α
m n✝ : ℕ
f : Stream' (Option α)
al : ∀ ⦃n : ℕ⦄ ⦃a : α⦄, f n = some a → f (n + 1) = some a
n : ℕ
a✝ : Nat.le m n
IH : ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } n = some a
⊢ ↑{ val := f, property := al } m = some a → ↑{ val := f, property := al } (Nat.succ n) = some a