tasksource/leandojo huggingface dataset:
Theorem: ZMod.natAbs_min_of_le_div_two
File: Mathlib/Data/ZMod/Basic.lean

tactic: rw [int_cast_eq_int_cast_iff_dvd_sub] at he
state_before: n✝ a n : ℕ
x y : ℤ
he : ↑x = ↑y
hl : Int.natAbs x ≤ n / 2
⊢ Int.natAbs x ≤ Int.natAbs y

tactic: obtain ⟨m, he⟩ := he
state_before: n✝ a n : ℕ
x y : ℤ
he : ↑n ∣ y - x
hl : Int.natAbs x ≤ n / 2
⊢ Int.natAbs x ≤ Int.natAbs y

tactic: rw [sub_eq_iff_eq_add] at he
state_before: case intro
n✝ a n : ℕ
x y : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
he : y - x = ↑n * m
⊢ Int.natAbs x ≤ Int.natAbs y

tactic: subst he
state_before: case intro
n✝ a n : ℕ
x y : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
he : y = ↑n * m + x
⊢ Int.natAbs x ≤ Int.natAbs y

tactic: obtain rfl | hm := eq_or_ne m 0
state_before: case intro
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
⊢ Int.natAbs x ≤ Int.natAbs (↑n * m + x)

tactic: apply hl.trans
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ Int.natAbs x ≤ Int.natAbs (↑n * m + x)

tactic: rw [← add_le_add_iff_right x.natAbs]
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ n / 2 ≤ Int.natAbs (↑n * m + x)

tactic: refine' le_trans (le_trans ((add_le_add_iff_left _).2 hl) _) (Int.natAbs_sub_le _ _)
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ n / 2 + Int.natAbs x ≤ Int.natAbs (↑n * m + x) + Int.natAbs x

tactic: rw [add_sub_cancel, Int.natAbs_mul, Int.natAbs_ofNat]
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ n / 2 + n / 2 ≤ Int.natAbs (↑n * m + x - x)

tactic: refine' le_trans _ (Nat.le_mul_of_pos_right <| Int.natAbs_pos.2 hm)
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ n / 2 + n / 2 ≤ n * Int.natAbs m

tactic: rw [← mul_two]
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ n / 2 + n / 2 ≤ n

tactic: apply Nat.div_mul_le_self
state_before: case intro.inr
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
m : ℤ
hm : m ≠ 0
⊢ n / 2 * 2 ≤ n

tactic: rw [MulZeroClass.mul_zero, zero_add]
state_before: case intro.inl
n✝ a n : ℕ
x : ℤ
hl : Int.natAbs x ≤ n / 2
⊢ Int.natAbs x ≤ Int.natAbs (↑n * 0 + x)
Theorem: Nat.eq_factorization_iff
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rw [h, factorization_prod_pow_eq_self hn]
state_before: n : ℕ
f : ℕ →₀ ℕ
hn : n ≠ 0
hf : ∀ (p : ℕ), p ∈ f.support → Prime p
h : f = factorization n
⊢ (Finsupp.prod f fun x x_1 => x ^ x_1) = n

tactic: rw [← h, prod_pow_factorization_eq_self hf]
state_before: n : ℕ
f : ℕ →₀ ℕ
hn : n ≠ 0
hf : ∀ (p : ℕ), p ∈ f.support → Prime p
h : (Finsupp.prod f fun x x_1 => x ^ x_1) = n
⊢ f = factorization n
Theorem: gauge_lt_eq'
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: ext
state_before: 𝕜 : Type ?u.62325
E : Type u_1
F : Type ?u.62331
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a✝ : ℝ
absorbs : Absorbent ℝ s
a : ℝ
⊢ {x | gauge s x < a} = ⋃ (r : ℝ) (_ : 0 < r) (_ : r < a), r • s

tactic: simp_rw [mem_setOf, mem_iUnion, exists_prop]
state_before: case h
𝕜 : Type ?u.62325
E : Type u_1
F : Type ?u.62331
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a✝ : ℝ
absorbs : Absorbent ℝ s
a : ℝ
x✝ : E
⊢ x✝ ∈ {x | gauge s x < a} ↔ x✝ ∈ ⋃ (r : ℝ) (_ : 0 < r) (_ : r < a), r • s

tactic: exact
  ⟨exists_lt_of_gauge_lt absorbs, fun ⟨r, hr₀, hr₁, hx⟩ =>
    (gauge_le_of_mem hr₀.le hx).trans_lt hr₁⟩
state_before: case h
𝕜 : Type ?u.62325
E : Type u_1
F : Type ?u.62331
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a✝ : ℝ
absorbs : Absorbent ℝ s
a : ℝ
x✝ : E
⊢ gauge s x✝ < a ↔ ∃ i, 0 < i ∧ i < a ∧ x✝ ∈ i • s
Theorem: Eq.congr
File: Mathlib/Logic/Basic.lean

tactic: subst h₁
state_before: α✝ : Sort u_1
x₁ y₁ x₂ y₂ : α✝
h₁ : x₁ = y₁
h₂ : x₂ = y₂
⊢ x₁ = x₂ ↔ y₁ = y₂

tactic: subst h₂
state_before: α✝ : Sort u_1
x₁ x₂ y₂ : α✝
h₂ : x₂ = y₂
⊢ x₁ = x₂ ↔ x₁ = y₂

tactic: rfl
state_before: α✝ : Sort u_1
x₁ x₂ : α✝
⊢ x₁ = x₂ ↔ x₁ = x₂
Theorem: Ideal.le_comap_pow
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: induction' n with n n_ih
state_before: R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
n : ℕ
⊢ comap f K ^ n ≤ comap f (K ^ n)

tactic: rw [pow_zero, pow_zero, Ideal.one_eq_top, Ideal.one_eq_top]
state_before: case zero
R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
⊢ comap f K ^ Nat.zero ≤ comap f (K ^ Nat.zero)

tactic: exact rfl.le
state_before: case zero
R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
⊢ ⊤ ≤ comap f ⊤

tactic: rw [pow_succ, pow_succ]
state_before: case succ
R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
n : ℕ
n_ih : comap f K ^ n ≤ comap f (K ^ n)
⊢ comap f K ^ Nat.succ n ≤ comap f (K ^ Nat.succ n)

tactic: exact (Ideal.mul_mono_right n_ih).trans (Ideal.le_comap_mul f)
state_before: case succ
R : Type u
S : Type v
F : Type u_1
inst✝¹ : CommRing R
inst✝ : CommRing S
rc : RingHomClass F R S
f : F
I J : Ideal R
K L : Ideal S
n : ℕ
n_ih : comap f K ^ n ≤ comap f (K ^ n)
⊢ comap f K * comap f K ^ n ≤ comap f (K * K ^ n)
Theorem: MeasureTheory.Lp.coeFn_negPart_eq_max
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [negPart]
state_before: α : Type u_1
E : Type ?u.8095959
F : Type ?u.8095962
G : Type ?u.8095965
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
f : { x // x ∈ Lp ℝ p }
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(negPart f) a = max (-↑↑f a) 0

tactic: filter_upwards [coeFn_posPart (-f), coeFn_neg f] with _ h₁ h₂
state_before: α : Type u_1
E : Type ?u.8095959
F : Type ?u.8095962
G : Type ?u.8095965
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
f : { x // x ∈ Lp ℝ p }
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(posPart (-f)) a = max (-↑↑f a) 0

tactic: rw [h₁, h₂, Pi.neg_apply]
state_before: case h
α : Type u_1
E : Type ?u.8095959
F : Type ?u.8095962
G : Type ?u.8095965
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
g : E → F
c : ℝ≥0
f : { x // x ∈ Lp ℝ p }
a✝ : α
h₁ : ↑↑(posPart (-f)) a✝ = max (↑↑(-f) a✝) 0
h₂ : ↑↑(-f) a✝ = (-↑↑f) a✝
⊢ ↑↑(posPart (-f)) a✝ = max (-↑↑f a✝) 0
Theorem: Polynomial.eval_mul_X
File: Mathlib/Data/Polynomial/Eval.lean

tactic: induction p using Polynomial.induction_on' with
| h_add p q ph qh =>
  simp only [add_mul, eval_add, ph, qh]
| h_monomial n a =>
  simp only [← monomial_one_one_eq_X, monomial_mul_monomial, eval_monomial, mul_one, pow_succ',
    mul_assoc]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
x : R
⊢ eval x (p * X) = eval x p * x

tactic: simp only [add_mul, eval_add, ph, qh]
state_before: case h_add
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝ : Semiring R
p✝ q✝ r : R[X]
x : R
p q : R[X]
ph : eval x (p * X) = eval x p * x
qh : eval x (q * X) = eval x q * x
⊢ eval x ((p + q) * X) = eval x (p + q) * x

tactic: simp only [← monomial_one_one_eq_X, monomial_mul_monomial, eval_monomial, mul_one, pow_succ',
  mul_assoc]
state_before: case h_monomial
R : Type u
S : Type v
T : Type w
ι : Type y
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
x : R
n : ℕ
a : R
⊢ eval x (↑(monomial n) a * X) = eval x (↑(monomial n) a) * x
Theorem: NNReal.coe_eq_zero
File: Mathlib/Data/Real/NNReal.lean

tactic: rw [← NNReal.coe_zero, NNReal.coe_eq]
state_before: r : ℝ≥0
⊢ ↑r = 0 ↔ r = 0
Theorem: LieIdeal.derivedSeries_map_eq
File: Mathlib/Algebra/Lie/Solvable.lean

tactic: induction' k with k ih
state_before: R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
k : ℕ
h : Function.Surjective ↑f
⊢ map f (derivedSeries R L' k) = derivedSeries R L k

tactic: change (⊤ : LieIdeal R L').map f = ⊤
state_before: case zero
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
h : Function.Surjective ↑f
⊢ map f (derivedSeries R L' Nat.zero) = derivedSeries R L Nat.zero

tactic: rw [← f.idealRange_eq_map]
state_before: case zero
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
h : Function.Surjective ↑f
⊢ map f ⊤ = ⊤

tactic: exact f.idealRange_eq_top_of_surjective h
state_before: case zero
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
h : Function.Surjective ↑f
⊢ LieHom.idealRange f = ⊤

tactic: simp only [derivedSeries_def, map_bracket_eq f h, ih, derivedSeriesOfIdeal_succ]
state_before: case succ
R : Type u
L : Type v
M : Type w
L' : Type w₁
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
I J : LieIdeal R L
f : L' →ₗ⁅R⁆ L
h : Function.Surjective ↑f
k : ℕ
ih : map f (derivedSeries R L' k) = derivedSeries R L k
⊢ map f (derivedSeries R L' (Nat.succ k)) = derivedSeries R L (Nat.succ k)
Theorem: EuclideanDomain.mul_div_mul_comm_of_dvd_dvd
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rcases eq_or_ne c 0 with (rfl | hc0)
state_before: R : Type u
inst✝ : EuclideanDomain R
a b c d : R
hac : c ∣ a
hbd : d ∣ b
⊢ a * b / (c * d) = a / c * (b / d)

tactic: rcases eq_or_ne d 0 with (rfl | hd0)
state_before: case inr
R : Type u
inst✝ : EuclideanDomain R
a b c d : R
hac : c ∣ a
hbd : d ∣ b
hc0 : c ≠ 0
⊢ a * b / (c * d) = a / c * (b / d)

tactic: obtain ⟨k1, rfl⟩ := hac
state_before: case inr.inr
R : Type u
inst✝ : EuclideanDomain R
a b c d : R
hac : c ∣ a
hbd : d ∣ b
hc0 : c ≠ 0
hd0 : d ≠ 0
⊢ a * b / (c * d) = a / c * (b / d)

tactic: obtain ⟨k2, rfl⟩ := hbd
state_before: case inr.inr.intro
R : Type u
inst✝ : EuclideanDomain R
b c d : R
hbd : d ∣ b
hc0 : c ≠ 0
hd0 : d ≠ 0
k1 : R
⊢ c * k1 * b / (c * d) = c * k1 / c * (b / d)

tactic: rw [mul_div_cancel_left _ hc0, mul_div_cancel_left _ hd0, mul_mul_mul_comm,
  mul_div_cancel_left _ (mul_ne_zero hc0 hd0)]
state_before: case inr.inr.intro.intro
R : Type u
inst✝ : EuclideanDomain R
c d : R
hc0 : c ≠ 0
hd0 : d ≠ 0
k1 k2 : R
⊢ c * k1 * (d * k2) / (c * d) = c * k1 / c * (d * k2 / d)

tactic: simp
state_before: case inl
R : Type u
inst✝ : EuclideanDomain R
a b d : R
hbd : d ∣ b
hac : 0 ∣ a
⊢ a * b / (0 * d) = a / 0 * (b / d)

tactic: simp
state_before: case inr.inl
R : Type u
inst✝ : EuclideanDomain R
a b c : R
hac : c ∣ a
hc0 : c ≠ 0
hbd : 0 ∣ b
⊢ a * b / (c * 0) = a / c * (b / 0)
Theorem: LinearMap.toMatrix_transpose
File: Mathlib/LinearAlgebra/Matrix/Dual.lean

tactic: ext (i j)
state_before: K : Type u_1
V₁ : Type u_2
V₂ : Type u_3
ι₁ : Type u_4
ι₂ : Type u_5
inst✝⁸ : Field K
inst✝⁷ : AddCommGroup V₁
inst✝⁶ : Module K V₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module K V₂
inst✝³ : Fintype ι₁
inst✝² : Fintype ι₂
inst✝¹ : DecidableEq ι₁
inst✝ : DecidableEq ι₂
B₁ : Basis ι₁ K V₁
B₂ : Basis ι₂ K V₂
u : V₁ →ₗ[K] V₂
⊢ ↑(toMatrix (Basis.dualBasis B₂) (Basis.dualBasis B₁)) (↑Module.Dual.transpose u) = (↑(toMatrix B₁ B₂) u)ᵀ

tactic: simp only [LinearMap.toMatrix_apply, Module.Dual.transpose_apply, B₁.dualBasis_repr,
  B₂.dualBasis_apply, Matrix.transpose_apply, LinearMap.comp_apply]
state_before: case a.h
K : Type u_1
V₁ : Type u_2
V₂ : Type u_3
ι₁ : Type u_4
ι₂ : Type u_5
inst✝⁸ : Field K
inst✝⁷ : AddCommGroup V₁
inst✝⁶ : Module K V₁
inst✝⁵ : AddCommGroup V₂
inst✝⁴ : Module K V₂
inst✝³ : Fintype ι₁
inst✝² : Fintype ι₂
inst✝¹ : DecidableEq ι₁
inst✝ : DecidableEq ι₂
B₁ : Basis ι₁ K V₁
B₂ : Basis ι₂ K V₂
u : V₁ →ₗ[K] V₂
i : ι₁
j : ι₂
⊢ ↑(toMatrix (Basis.dualBasis B₂) (Basis.dualBasis B₁)) (↑Module.Dual.transpose u) i j = (↑(toMatrix B₁ B₂) u)ᵀ i j
Theorem: List.forall₂_same
File: Mathlib/Data/List/Forall2.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.7583
γ : Type ?u.7586
δ : Type ?u.7589
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
⊢ Forall₂ Rₐ [] [] ↔ ∀ (x : α), x ∈ [] → Rₐ x x

tactic: simp [@forall₂_same l]
state_before: α : Type u_1
β : Type ?u.7583
γ : Type ?u.7586
δ : Type ?u.7589
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
a : α
l : List α
⊢ Forall₂ Rₐ (a :: l) (a :: l) ↔ ∀ (x : α), x ∈ a :: l → Rₐ x x
Theorem: ENNReal.ofReal_add
File: Mathlib/Data/Real/ENNReal.lean

tactic: rw [ENNReal.ofReal, ENNReal.ofReal, ENNReal.ofReal, ← coe_add, coe_eq_coe,
  Real.toNNReal_add hp hq]
state_before: α : Type ?u.794102
β : Type ?u.794105
a b c d : ℝ≥0∞
r p✝ q✝ : ℝ≥0
p q : ℝ
hp : 0 ≤ p
hq : 0 ≤ q
⊢ ENNReal.ofReal (p + q) = ENNReal.ofReal p + ENNReal.ofReal q
Theorem: Matrix.transpose_sub
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.926733
m : Type u_1
n : Type u_2
o : Type ?u.926742
m' : o → Type ?u.926747
n' : o → Type ?u.926752
R : Type ?u.926755
S : Type ?u.926758
α : Type v
β : Type w
γ : Type ?u.926765
inst✝ : Sub α
M N : Matrix m n α
⊢ (M - N)ᵀ = Mᵀ - Nᵀ

tactic: simp
state_before: case a.h
l : Type ?u.926733
m : Type u_1
n : Type u_2
o : Type ?u.926742
m' : o → Type ?u.926747
n' : o → Type ?u.926752
R : Type ?u.926755
S : Type ?u.926758
α : Type v
β : Type w
γ : Type ?u.926765
inst✝ : Sub α
M N : Matrix m n α
i✝ : n
x✝ : m
⊢ (M - N)ᵀ i✝ x✝ = (Mᵀ - Nᵀ) i✝ x✝
Theorem: List.exists_of_replaceF
File: Std/Data/List/Lemmas.lean

tactic: simp [pb]
state_before: α : Type u_1
p : α → Option α
b : α
l : List α
a a' : α
al : a ∈ b :: l
pa : p a = some a'
b' : α
pb : p b = some b'
⊢ b :: l = [] ++ b :: l ∧ replaceF p (b :: l) = [] ++ b' :: l

tactic: rw [h₃, cons_append]
state_before: α : Type u_1
p : α → Option α
b✝ : α
l : List α
a a' : α
al✝ : a ∈ b✝ :: l
pa : p a = some a'
b : α
al : Mem a l
pb : p b = none
c c' : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → p b = none
h₂ : p c = some c'
h₃ : l = l₁ ++ c :: l₂
h₄ : replaceF p l = l₁ ++ c' :: l₂
⊢ b :: l = b :: l₁ ++ c :: l₂

tactic: simp [pb, h₄]
state_before: α : Type u_1
p : α → Option α
b✝ : α
l : List α
a a' : α
al✝ : a ∈ b✝ :: l
pa : p a = some a'
b : α
al : Mem a l
pb : p b = none
c c' : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → p b = none
h₂ : p c = some c'
h₃ : l = l₁ ++ c :: l₂
h₄ : replaceF p l = l₁ ++ c' :: l₂
⊢ replaceF p (b :: l) = b :: l₁ ++ c' :: l₂
Theorem: PowerBasis.exists_eq_aeval'
File: Mathlib/RingTheory/PowerBasis.lean

tactic: nontriviality S
state_before: R : Type u_1
S : Type u_2
T : Type ?u.46692
inst✝⁷ : CommRing R
inst✝⁶ : Ring S
inst✝⁵ : Algebra R S
A : Type ?u.46995
B : Type ?u.46998
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : IsDomain B
inst✝¹ : Algebra A B
K : Type ?u.47420
inst✝ : Field K
pb : PowerBasis R S
y : S
⊢ ∃ f, y = ↑(aeval pb.gen) f

tactic: obtain ⟨f, _, hf⟩ := exists_eq_aeval pb y
state_before: R : Type u_1
S : Type u_2
T : Type ?u.46692
inst✝⁷ : CommRing R
inst✝⁶ : Ring S
inst✝⁵ : Algebra R S
A : Type ?u.46995
B : Type ?u.46998
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : IsDomain B
inst✝¹ : Algebra A B
K : Type ?u.47420
inst✝ : Field K
pb : PowerBasis R S
y : S
✝ : Nontrivial S
⊢ ∃ f, y = ↑(aeval pb.gen) f

tactic: exact ⟨f, hf⟩
state_before: case intro.intro
R : Type u_1
S : Type u_2
T : Type ?u.46692
inst✝⁷ : CommRing R
inst✝⁶ : Ring S
inst✝⁵ : Algebra R S
A : Type ?u.46995
B : Type ?u.46998
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : IsDomain B
inst✝¹ : Algebra A B
K : Type ?u.47420
inst✝ : Field K
pb : PowerBasis R S
y : S
✝ : Nontrivial S
f : R[X]
left✝ : natDegree f < pb.dim
hf : y = ↑(aeval pb.gen) f
⊢ ∃ f, y = ↑(aeval pb.gen) f
Theorem: Finset.image_swap_product
File: Mathlib/Data/Finset/Prod.lean

tactic: push_cast
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.18234
s✝ s' : Finset α
t✝ t' : Finset β
a : α
b : β
inst✝ : DecidableEq (α × β)
s : Finset α
t : Finset β
⊢ ↑(image Prod.swap (t ×ˢ s)) = ↑(s ×ˢ t)

tactic: exact Set.image_swap_prod _ _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.18234
s✝ s' : Finset α
t✝ t' : Finset β
a : α
b : β
inst✝ : DecidableEq (α × β)
s : Finset α
t : Finset β
⊢ Prod.swap '' ↑t ×ˢ ↑s = ↑s ×ˢ ↑t
Theorem: QuotientMap.continuous_iff
File: Mathlib/Topology/Maps.lean

tactic: rw [continuous_iff_coinduced_le, continuous_iff_coinduced_le, hf.right, coinduced_compose]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.138402
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
g : β → γ
f : α → β
hf : QuotientMap f
⊢ Continuous g ↔ Continuous (g ∘ f)
Theorem: Metric.dist_lt_add_of_nonempty_ball_inter_closedBall
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [inter_comm] at h
state_before: α : Type u
β : Type v
X : Type ?u.42927
ι : Type ?u.42930
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : Set.Nonempty (ball x ε₁ ∩ closedBall y ε₂)
⊢ dist x y < ε₁ + ε₂

tactic: rw [add_comm, dist_comm]
state_before: α : Type u
β : Type v
X : Type ?u.42927
ι : Type ?u.42930
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : Set.Nonempty (closedBall y ε₂ ∩ ball x ε₁)
⊢ dist x y < ε₁ + ε₂

tactic: exact dist_lt_add_of_nonempty_closedBall_inter_ball h
state_before: α : Type u
β : Type v
X : Type ?u.42927
ι : Type ?u.42930
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : Set.Nonempty (closedBall y ε₂ ∩ ball x ε₁)
⊢ dist y x < ε₂ + ε₁
Theorem: Turing.Tape.move_left_mk'
File: Mathlib/Computability/TuringMachine.lean

tactic: simp only [Tape.move, Tape.mk', ListBlank.head_cons, eq_self_iff_true, ListBlank.cons_head_tail,
  and_self_iff, ListBlank.tail_cons]
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
L R : ListBlank Γ
⊢ move Dir.left (mk' L R) = mk' (ListBlank.tail L) (ListBlank.cons (ListBlank.head L) R)
Theorem: CategoryTheory.Limits.prod.comp_diag
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp
state_before: C : Type u
inst✝¹ : Category C
X✝ Y✝ X Y : C
inst✝ : HasBinaryProduct Y Y
f : X ⟶ Y
⊢ f ≫ diag Y = lift f f
Theorem: Set.image_empty
File: Mathlib/Data/Set/Image.lean

tactic: ext
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.30321
ι : Sort ?u.30324
ι' : Sort ?u.30327
f✝ : α → β
s t : Set α
f : α → β
⊢ f '' ∅ = ∅

tactic: simp
state_before: case h
α : Type u_2
β : Type u_1
γ : Type ?u.30321
ι : Sort ?u.30324
ι' : Sort ?u.30327
f✝ : α → β
s t : Set α
f : α → β
x✝ : β
⊢ x✝ ∈ f '' ∅ ↔ x✝ ∈ ∅
Theorem: List.foldl_assoc
File: Mathlib/Data/List/Basic.lean

tactic: simp only [foldl_cons, ha.assoc]
state_before: ι : Type ?u.264536
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
op : α → α → α
ha : IsAssociative α op
hc : IsCommutative α op
a : α
l : List α
a₁ a₂ : α
⊢ ((a :: l) <*> op a₁ a₂) = l <*> op a₁ (op a₂ a)

tactic: rw [foldl_assoc, foldl_cons]
state_before: ι : Type ?u.264536
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
op : α → α → α
ha : IsAssociative α op
hc : IsCommutative α op
a : α
l : List α
a₁ a₂ : α
⊢ (l <*> op a₁ (op a₂ a)) = op a₁ ((a :: l) <*> a₂)
Theorem: IsLowerSet.not_bddBelow
File: Mathlib/Order/UpperLower/Basic.lean

tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: α : Type u_1
β : Type ?u.23495
γ : Type ?u.23498
ι : Sort ?u.23501
κ : ι → Sort ?u.23506
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
⊢ Set.Nonempty s → ¬BddBelow s

tactic: obtain ⟨c, hc⟩ := exists_lt b
state_before: case intro.intro
α : Type u_1
β : Type ?u.23495
γ : Type ?u.23498
ι : Sort ?u.23501
κ : ι → Sort ?u.23506
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a✝ : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
a : α
ha : a ∈ s
b : α
hb : b ∈ lowerBounds s
⊢ False

tactic: exact hc.not_le (hb <| hs (hc.le.trans <| hb ha) ha)
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.23495
γ : Type ?u.23498
ι : Sort ?u.23501
κ : ι → Sort ?u.23506
inst✝² : Preorder α
inst✝¹ : Preorder β
s : Set α
p : α → Prop
a✝ : α
inst✝ : NoMinOrder α
hs : IsLowerSet s
a : α
ha : a ∈ s
b : α
hb : b ∈ lowerBounds s
c : α
hc : c < b
⊢ False
Theorem: List.prod_inv
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: simp
state_before: ι : Type ?u.118773
α : Type ?u.118776
M : Type ?u.118779
N : Type ?u.118782
P : Type ?u.118785
M₀ : Type ?u.118788
G : Type u_1
R : Type ?u.118794
inst✝ : CommGroup G
⊢ (prod [])⁻¹ = prod (map (fun x => x⁻¹) [])

tactic: simp [mul_comm, prod_inv xs]
state_before: ι : Type ?u.118773
α : Type ?u.118776
M : Type ?u.118779
N : Type ?u.118782
P : Type ?u.118785
M₀ : Type ?u.118788
G : Type u_1
R : Type ?u.118794
inst✝ : CommGroup G
x : G
xs : List G
⊢ (prod (x :: xs))⁻¹ = prod (map (fun x => x⁻¹) (x :: xs))
Theorem: EMetric.tendsto_atTop
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: simp only [exists_prop, true_and_iff, mem_Ici, mem_ball]
state_before: α : Type u
β : Type v
X : Type ?u.224214
inst✝² : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
inst✝¹ : Nonempty β
inst✝ : SemilatticeSup β
u : β → α
a : α
⊢ (∀ (ib : ℝ≥0∞), 0 < ib → ∃ ia, True ∧ ∀ (x : β), x ∈ Ici ia → u x ∈ ball a ib) ↔
    ∀ (ε : ℝ≥0∞), ε > 0 → ∃ N, ∀ (n : β), n ≥ N → edist (u n) a < ε
Theorem: continuous_iff_isClosed
File: Mathlib/Topology/Basic.lean

tactic: simp only [isOpen_compl_iff, preimage_compl]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.170252
δ : Type ?u.170255
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
⊢ (∀ (x : Set β), IsOpen (xᶜ) → IsOpen (f ⁻¹' xᶜ)) ↔ ∀ (s : Set β), IsClosed s → IsClosed (f ⁻¹' s)
Theorem: eq_lim_at_left_extendFrom_Ioo
File: Mathlib/Topology/Algebra/Order/ExtendFrom.lean

tactic: apply extendFrom_eq
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : T2Space β
f : α → β
a b : α
la : β
hab : a < b
ha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)
⊢ extendFrom (Ioo a b) f a = la

tactic: rw [closure_Ioo hab.ne]
state_before: case hx
α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : T2Space β
f : α → β
a b : α
la : β
hab : a < b
ha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)
⊢ a ∈ closure (Ioo a b)

tactic: simp only [le_of_lt hab, left_mem_Icc, right_mem_Icc]
state_before: case hx
α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : T2Space β
f : α → β
a b : α
la : β
hab : a < b
ha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)
⊢ a ∈ Icc a b

tactic: simpa [hab]
state_before: case hf
α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : T2Space β
f : α → β
a b : α
la : β
hab : a < b
ha : Tendsto f (𝓝[Ioi a] a) (𝓝 la)
⊢ Tendsto f (𝓝[Ioo a b] a) (𝓝 la)
Theorem: MeasurableSpace.generateMeasurableRec_subset
File: Mathlib/MeasureTheory/CardMeasurableSpace.lean

tactic: rcases eq_or_lt_of_le h with (rfl | h)
state_before: α : Type u
s : Set (Set α)
i j : (Quotient.out (ord (aleph 1))).α
h : i ≤ j
x : Set α
hx : x ∈ generateMeasurableRec s i
⊢ x ∈ generateMeasurableRec s j

tactic: exact hx
state_before: case inl
α : Type u
s : Set (Set α)
i : (Quotient.out (ord (aleph 1))).α
x : Set α
hx : x ∈ generateMeasurableRec s i
h : i ≤ i
⊢ x ∈ generateMeasurableRec s i

tactic: convert iUnion_mem_generateMeasurableRec fun _ => ⟨i, h, hx⟩
state_before: case inr
α : Type u
s : Set (Set α)
i j : (Quotient.out (ord (aleph 1))).α
h✝ : i ≤ j
x : Set α
hx : x ∈ generateMeasurableRec s i
h : i < j
⊢ x ∈ generateMeasurableRec s j

tactic: exact (iUnion_const x).symm
state_before: case h.e'_4
α : Type u
s : Set (Set α)
i j : (Quotient.out (ord (aleph 1))).α
h✝ : i ≤ j
x : Set α
hx : x ∈ generateMeasurableRec s i
h : i < j
⊢ x = ⋃ (n : ℕ), x