tasksource/leandojo huggingface dataset:
Theorem: Polynomial.annIdealGenerator_eq_minpoly
File: Mathlib/LinearAlgebra/AnnihilatingPolynomial.lean

tactic: by_cases h : annIdealGenerator 𝕜 a = 0
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
⊢ annIdealGenerator 𝕜 a = minpoly 𝕜 a

tactic: rw [h, minpoly.eq_zero]
state_before: case pos
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
h : annIdealGenerator 𝕜 a = 0
⊢ annIdealGenerator 𝕜 a = minpoly 𝕜 a

tactic: rintro ⟨p, p_monic, hp : aeval a p = 0⟩
state_before: case pos
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
h : annIdealGenerator 𝕜 a = 0
⊢ ¬IsIntegral 𝕜 a

tactic: refine' p_monic.ne_zero (Ideal.mem_bot.mp _)
state_before: case pos.intro.intro
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
h : annIdealGenerator 𝕜 a = 0
p : 𝕜[X]
p_monic : Monic p
hp : ↑(aeval a) p = 0
⊢ False

tactic: simpa only [annIdealGenerator_eq_zero_iff.mp h] using mem_annIdeal_iff_aeval_eq_zero.mpr hp
state_before: case pos.intro.intro
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
h : annIdealGenerator 𝕜 a = 0
p : 𝕜[X]
p_monic : Monic p
hp : ↑(aeval a) p = 0
⊢ p ∈ ⊥

tactic: exact minpoly.unique _ _ (monic_annIdealGenerator _ _ h) (annIdealGenerator_aeval_eq_zero _ _)
  fun q q_monic hq =>
    degree_annIdealGenerator_le_of_mem a q (mem_annIdeal_iff_aeval_eq_zero.mpr hq)
      q_monic.ne_zero
state_before: case neg
𝕜 : Type u_1
A : Type u_2
inst✝² : Field 𝕜
inst✝¹ : Ring A
inst✝ : Algebra 𝕜 A
a : A
h : ¬annIdealGenerator 𝕜 a = 0
⊢ annIdealGenerator 𝕜 a = minpoly 𝕜 a
Theorem: ForInStep.bindList_cons'
File: Std/Control/ForInStep/Lemmas.lean

tactic: simp
state_before: m : Type u_1 → Type u_2
α : Type u_3
β : Type u_1
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : α → β → m (ForInStep β)
s : ForInStep β
a : α
l : List α
⊢ bindList f (a :: l) s = do
    let x ← ForInStep.bind s (f a)
    bindList f l x
Theorem: MeasureTheory.continuousWithinAt_of_dominated
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: simp only [integral, L1.integral]
state_before: α : Type u_2
E : Type u_3
F✝ : Type ?u.1013642
𝕜 : Type ?u.1013645
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
inst✝² : CompleteSpace F✝
f g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
F : X → α → E
x₀ : X
bound : α → ℝ
s : Set X
hF_meas : ∀ᶠ (x : X) in 𝓝[s] x₀, AEStronglyMeasurable (F x) μ
h_bound : ∀ᶠ (x : X) in 𝓝[s] x₀, ∀ᵐ (a : α) ∂μ, ‖F x a‖ ≤ bound a
bound_integrable : Integrable bound
h_cont : ∀ᵐ (a : α) ∂μ, ContinuousWithinAt (fun x => F x a) s x₀
⊢ ContinuousWithinAt (fun x => ∫ (a : α), F x a ∂μ) s x₀

tactic: exact continuousWithinAt_setToFun_of_dominated (dominatedFinMeasAdditive_weightedSMul μ)
  hF_meas h_bound bound_integrable h_cont
state_before: α : Type u_2
E : Type u_3
F✝ : Type ?u.1013642
𝕜 : Type ?u.1013645
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F✝
inst✝³ : NormedSpace ℝ F✝
inst✝² : CompleteSpace F✝
f g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
F : X → α → E
x₀ : X
bound : α → ℝ
s : Set X
hF_meas : ∀ᶠ (x : X) in 𝓝[s] x₀, AEStronglyMeasurable (F x) μ
h_bound : ∀ᶠ (x : X) in 𝓝[s] x₀, ∀ᵐ (a : α) ∂μ, ‖F x a‖ ≤ bound a
bound_integrable : Integrable bound
h_cont : ∀ᵐ (a : α) ∂μ, ContinuousWithinAt (fun x => F x a) s x₀
⊢ ContinuousWithinAt
    (fun x => if hf : Integrable fun a => F x a then ↑L1.integralCLM (Integrable.toL1 (fun a => F x a) hf) else 0) s x₀
Theorem: AlgebraicGeometry.PresheafedSpace.map_id_c_app
File: Mathlib/AlgebraicGeometry/PresheafedSpace/HasColimits.lean

tactic: simp
state_before: J : Type u'
inst✝¹ : Category J
C : Type u
inst✝ : Category C
F : J ⥤ PresheafedSpace C
j : J
U : Opens ↑↑(F.obj j)
⊢ 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base

tactic: cases U
state_before: J : Type u'
inst✝¹ : Category J
C : Type u
inst✝ : Category C
F : J ⥤ PresheafedSpace C
j : J
U : Opens ↑↑(F.obj j)
⊢ (F.map (𝟙 j)).c.app U.op =
    (Pushforward.id (F.obj j).presheaf).inv.app U.op ≫
      (pushforwardEq (_ : 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base) (F.obj j).presheaf).hom.app U.op

tactic: simp [PresheafedSpace.congr_app (F.map_id j)]
state_before: case mk
J : Type u'
inst✝¹ : Category J
C : Type u
inst✝ : Category C
F : J ⥤ PresheafedSpace C
j : J
carrier✝ : Set ↑↑(F.obj j)
is_open'✝ : IsOpen carrier✝
⊢ (F.map (𝟙 j)).c.app { carrier := carrier✝, is_open' := is_open'✝ }.op =
    (Pushforward.id (F.obj j).presheaf).inv.app { carrier := carrier✝, is_open' := is_open'✝ }.op ≫
      (pushforwardEq (_ : 𝟙 ↑(F.obj j) = (F.map (𝟙 j)).base) (F.obj j).presheaf).hom.app
        { carrier := carrier✝, is_open' := is_open'✝ }.op
Theorem: Complex.mem_rootsOfUnity
File: Mathlib/RingTheory/RootsOfUnity/Complex.lean

tactic: rw [mem_rootsOfUnity, Units.ext_iff, Units.val_pow_eq_pow_val, Units.val_one]
state_before: n : ℕ+
x : ℂˣ
⊢ x ∈ rootsOfUnity n ℂ ↔ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: have hn0 : (n : ℂ) ≠ 0 := by exact_mod_cast n.ne_zero
state_before: n : ℕ+
x : ℂˣ
⊢ ↑x ^ ↑n = 1 ↔ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: constructor
state_before: n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
⊢ ↑x ^ ↑n = 1 ↔ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: exact_mod_cast n.ne_zero
state_before: n : ℕ+
x : ℂˣ
⊢ ↑↑n ≠ 0

tactic: intro h
state_before: case mp
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
⊢ ↑x ^ ↑n = 1 → ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: obtain ⟨i, hi, H⟩ : ∃ i < (n : ℕ), exp (2 * π * I / n) ^ i = x := by
  simpa only using (isPrimitiveRoot_exp n n.ne_zero).eq_pow_of_pow_eq_one h n.pos
state_before: case mp
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
h : ↑x ^ ↑n = 1
⊢ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: refine' ⟨i, hi, _⟩
state_before: case mp.intro.intro
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
h : ↑x ^ ↑n = 1
i : ℕ
hi : i < ↑n
H : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x
⊢ ∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: rw [← H, ← exp_nat_mul]
state_before: case mp.intro.intro
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
h : ↑x ^ ↑n = 1
i : ℕ
hi : i < ↑n
H : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x
⊢ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x

tactic: congr 1
state_before: case mp.intro.intro
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
h : ↑x ^ ↑n = 1
i : ℕ
hi : i < ↑n
H : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x
⊢ exp (2 * ↑π * I * (↑i / ↑↑n)) = exp (↑i * (2 * ↑π * I / ↑↑n))

tactic: field_simp [hn0, mul_comm (i : ℂ)]
state_before: case mp.intro.intro.e_z
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
h : ↑x ^ ↑n = 1
i : ℕ
hi : i < ↑n
H : exp (2 * ↑π * I / ↑↑n) ^ i = ↑x
⊢ 2 * ↑π * I * (↑i / ↑↑n) = ↑i * (2 * ↑π * I / ↑↑n)

tactic: simpa only using (isPrimitiveRoot_exp n n.ne_zero).eq_pow_of_pow_eq_one h n.pos
state_before: n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
h : ↑x ^ ↑n = 1
⊢ ∃ i, i < ↑n ∧ exp (2 * ↑π * I / ↑↑n) ^ i = ↑x

tactic: rintro ⟨i, _, H⟩
state_before: case mpr
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
⊢ (∃ i, i < ↑n ∧ exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x) → ↑x ^ ↑n = 1

tactic: rw [← H, ← exp_nat_mul, exp_eq_one_iff]
state_before: case mpr.intro.intro
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
i : ℕ
left✝ : i < ↑n
H : exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x
⊢ ↑x ^ ↑n = 1

tactic: use i
state_before: case mpr.intro.intro
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
i : ℕ
left✝ : i < ↑n
H : exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x
⊢ ∃ n_1, ↑↑n * (2 * ↑π * I * (↑i / ↑↑n)) = ↑n_1 * (2 * ↑π * I)

tactic: field_simp [hn0, mul_comm ((n : ℕ) : ℂ), mul_comm (i : ℂ)]
state_before: case mpr.intro.intro
n : ℕ+
x : ℂˣ
hn0 : ↑↑n ≠ 0
i : ℕ
left✝ : i < ↑n
H : exp (2 * ↑π * I * (↑i / ↑↑n)) = ↑x
⊢ ↑↑n * (2 * ↑π * I * (↑i / ↑↑n)) = ↑↑i * (2 * ↑π * I)
Theorem: HasCompactMulSupport.comp_closedEmbedding
File: Mathlib/Topology/Support.lean

tactic: rw [hasCompactMulSupport_def, Function.mulSupport_comp_eq_preimage]
state_before: X : Type ?u.15456
α : Type u_1
α' : Type u_3
β : Type u_2
γ : Type ?u.15468
δ : Type ?u.15471
M : Type ?u.15474
E : Type ?u.15477
R : Type ?u.15480
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace α'
inst✝² : One β
inst✝¹ : One γ
inst✝ : One δ
g✝ : β → γ
f : α → β
f₂ : α → γ
m : β → γ → δ
x : α
hf : HasCompactMulSupport f
g : α' → α
hg : ClosedEmbedding g
⊢ HasCompactMulSupport (f ∘ g)

tactic: refine' isCompact_of_isClosed_subset (hg.isCompact_preimage hf) isClosed_closure _
state_before: X : Type ?u.15456
α : Type u_1
α' : Type u_3
β : Type u_2
γ : Type ?u.15468
δ : Type ?u.15471
M : Type ?u.15474
E : Type ?u.15477
R : Type ?u.15480
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace α'
inst✝² : One β
inst✝¹ : One γ
inst✝ : One δ
g✝ : β → γ
f : α → β
f₂ : α → γ
m : β → γ → δ
x : α
hf : HasCompactMulSupport f
g : α' → α
hg : ClosedEmbedding g
⊢ IsCompact (closure (g ⁻¹' mulSupport f))

tactic: rw [hg.toEmbedding.closure_eq_preimage_closure_image]
state_before: X : Type ?u.15456
α : Type u_1
α' : Type u_3
β : Type u_2
γ : Type ?u.15468
δ : Type ?u.15471
M : Type ?u.15474
E : Type ?u.15477
R : Type ?u.15480
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace α'
inst✝² : One β
inst✝¹ : One γ
inst✝ : One δ
g✝ : β → γ
f : α → β
f₂ : α → γ
m : β → γ → δ
x : α
hf : HasCompactMulSupport f
g : α' → α
hg : ClosedEmbedding g
⊢ closure (g ⁻¹' mulSupport f) ⊆ g ⁻¹' mulTSupport f

tactic: exact preimage_mono (closure_mono <| image_preimage_subset _ _)
state_before: X : Type ?u.15456
α : Type u_1
α' : Type u_3
β : Type u_2
γ : Type ?u.15468
δ : Type ?u.15471
M : Type ?u.15474
E : Type ?u.15477
R : Type ?u.15480
inst✝⁴ : TopologicalSpace α
inst✝³ : TopologicalSpace α'
inst✝² : One β
inst✝¹ : One γ
inst✝ : One δ
g✝ : β → γ
f : α → β
f₂ : α → γ
m : β → γ → δ
x : α
hf : HasCompactMulSupport f
g : α' → α
hg : ClosedEmbedding g
⊢ g ⁻¹' closure (g '' (g ⁻¹' mulSupport f)) ⊆ g ⁻¹' mulTSupport f
Theorem: MeasureTheory.Measure.bind_bind
File: Mathlib/MeasureTheory/Measure/GiryMonad.lean

tactic: ext1 s hs
state_before: α : Type u_2
β : Type u_3
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
γ : Type u_1
inst✝ : MeasurableSpace γ
m : Measure α
f : α → Measure β
g : β → Measure γ
hf : Measurable f
hg : Measurable g
⊢ bind (bind m f) g = bind m fun a => bind (f a) g

tactic: erw [bind_apply hs hg, bind_apply hs ((measurable_bind' hg).comp hf),
  lintegral_bind hf ((measurable_coe hs).comp hg)]
state_before: case h
α : Type u_2
β : Type u_3
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
γ : Type u_1
inst✝ : MeasurableSpace γ
m : Measure α
f : α → Measure β
g : β → Measure γ
hf : Measurable f
hg : Measurable g
s : Set γ
hs : MeasurableSet s
⊢ ↑↑(bind (bind m f) g) s = ↑↑(bind m fun a => bind (f a) g) s

tactic: conv_rhs => enter [2, a]; erw [bind_apply hs hg]
state_before: case h
α : Type u_2
β : Type u_3
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
γ : Type u_1
inst✝ : MeasurableSpace γ
m : Measure α
f : α → Measure β
g : β → Measure γ
hf : Measurable f
hg : Measurable g
s : Set γ
hs : MeasurableSet s
⊢ (∫⁻ (a : α), ∫⁻ (x : β), ((fun μ => ↑↑μ s) ∘ g) x ∂f a ∂m) = ∫⁻ (a : α), ↑↑(((fun m => bind m g) ∘ f) a) s ∂m
Theorem: Matrix.blockTriangular_reindex_iff
File: Mathlib/LinearAlgebra/Matrix/Block.lean

tactic: refine' ⟨fun h => _, fun h => _⟩
state_before: α : Type u_3
β : Type ?u.756
m : Type u_1
n : Type u_2
o : Type ?u.765
m' : α → Type ?u.770
n' : α → Type ?u.775
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
⊢ BlockTriangular (↑(reindex e e) M) b ↔ BlockTriangular M (b ∘ ↑e)

tactic: convert h.submatrix
state_before: case refine'_1
α : Type u_3
β : Type ?u.756
m : Type u_1
n : Type u_2
o : Type ?u.765
m' : α → Type ?u.770
n' : α → Type ?u.775
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : BlockTriangular (↑(reindex e e) M) b
⊢ BlockTriangular M (b ∘ ↑e)

tactic: simp only [reindex_apply, submatrix_submatrix, submatrix_id_id, Equiv.symm_comp_self]
state_before: case h.e'_6
α : Type u_3
β : Type ?u.756
m : Type u_1
n : Type u_2
o : Type ?u.765
m' : α → Type ?u.770
n' : α → Type ?u.775
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : BlockTriangular (↑(reindex e e) M) b
⊢ M = submatrix (↑(reindex e e) M) ↑e ↑e

tactic: convert h.submatrix
state_before: case refine'_2
α : Type u_3
β : Type ?u.756
m : Type u_1
n : Type u_2
o : Type ?u.765
m' : α → Type ?u.770
n' : α → Type ?u.775
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : BlockTriangular M (b ∘ ↑e)
⊢ BlockTriangular (↑(reindex e e) M) b

tactic: simp only [comp.assoc b e e.symm, Equiv.self_comp_symm, comp.right_id]
state_before: case h.e'_7
α : Type u_3
β : Type ?u.756
m : Type u_1
n : Type u_2
o : Type ?u.765
m' : α → Type ?u.770
n' : α → Type ?u.775
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : BlockTriangular M (b ∘ ↑e)
⊢ b = (b ∘ ↑e) ∘ fun i => ↑e.symm i
Theorem: Polynomial.Chebyshev.T_mul
File: Mathlib/RingTheory/Polynomial/Chebyshev.lean

tactic: simp
state_before: R : Type u_1
S : Type ?u.113283
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ ∀ (n : ℕ), T R (0 * n) = comp (T R 0) (T R n)

tactic: simp
state_before: R : Type u_1
S : Type ?u.113283
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ ∀ (n : ℕ), T R (1 * n) = comp (T R 1) (T R n)

tactic: intro n
state_before: R : Type u_1
S : Type ?u.113283
inst✝¹ : CommRing R
inst✝ : CommRing S
m : ℕ
⊢ ∀ (n : ℕ), T R ((m + 2) * n) = comp (T R (m + 2)) (T R n)

tactic: have : 2 * T R n * T R ((m + 1) * n) = T R ((m + 2) * n) + T R (m * n) := by
  convert mul_T R n (m * n) using 1 <;> ring_nf
state_before: R : Type u_1
S : Type ?u.113283
inst✝¹ : CommRing R
inst✝ : CommRing S
m n : ℕ
⊢ T R ((m + 2) * n) = comp (T R (m + 2)) (T R n)

tactic: simp [this, T_mul m, ← T_mul (m + 1)]
state_before: R : Type u_1
S : Type ?u.113283
inst✝¹ : CommRing R
inst✝ : CommRing S
m n : ℕ
this : 2 * T R n * T R ((m + 1) * n) = T R ((m + 2) * n) + T R (m * n)
⊢ T R ((m + 2) * n) = comp (T R (m + 2)) (T R n)

tactic: convert mul_T R n (m * n) using 1 <;> ring_nf
state_before: R : Type u_1
S : Type ?u.113283
inst✝¹ : CommRing R
inst✝ : CommRing S
m n : ℕ
⊢ 2 * T R n * T R ((m + 1) * n) = T R ((m + 2) * n) + T R (m * n)
Theorem: Set.pairwise_disjoint_Ioc_zpow
File: Mathlib/Data/Set/Intervals/Group.lean

tactic: simpa only [one_mul] using pairwise_disjoint_Ioc_mul_zpow 1 b
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
a b : α
⊢ Pairwise (Disjoint on fun n => Ioc (b ^ n) (b ^ (n + 1)))
Theorem: Function.extend_inv
File: Mathlib/Data/Pi/Algebra.lean

tactic: classical
funext x
simp only [not_exists, extend_def, Pi.inv_apply, apply_dite Inv.inv]
state_before: I : Type u
α : Type u_3
β : Type u_2
γ : Type u_1
f✝ : I → Type v₁
g✝ : I → Type v₂
h : I → Type v₃
x y : (i : I) → f✝ i
i : I
inst✝ : Inv γ
f : α → β
g : α → γ
e : β → γ
⊢ extend f g⁻¹ e⁻¹ = (extend f g e)⁻¹

tactic: funext x
state_before: I : Type u
α : Type u_3
β : Type u_2
γ : Type u_1
f✝ : I → Type v₁
g✝ : I → Type v₂
h : I → Type v₃
x y : (i : I) → f✝ i
i : I
inst✝ : Inv γ
f : α → β
g : α → γ
e : β → γ
⊢ extend f g⁻¹ e⁻¹ = (extend f g e)⁻¹

tactic: simp only [not_exists, extend_def, Pi.inv_apply, apply_dite Inv.inv]
state_before: case h
I : Type u
α : Type u_3
β : Type u_2
γ : Type u_1
f✝ : I → Type v₁
g✝ : I → Type v₂
h : I → Type v₃
x✝ y : (i : I) → f✝ i
i : I
inst✝ : Inv γ
f : α → β
g : α → γ
e : β → γ
x : β
⊢ extend f g⁻¹ e⁻¹ x = (extend f g e)⁻¹ x
Theorem: List.Chain'.imp
File: Mathlib/Data/List/Chain.lean

tactic: cases l <;> [trivial; exact Chain.imp H p]
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a b : α
S : α → α → Prop
H : ∀ (a b : α), R a b → S a b
l : List α
p : Chain' R l
⊢ Chain' S l
Theorem: IsBezout.gcd_eq_sum
File: Mathlib/RingTheory/Bezout.lean

tactic: rw [← span_gcd]
state_before: R : Type u
inst✝¹ : CommRing R
inst✝ : IsBezout R
x y : R
⊢ gcd x y ∈ Ideal.span {x, y}

tactic: apply Ideal.subset_span
state_before: R : Type u
inst✝¹ : CommRing R
inst✝ : IsBezout R
x y : R
⊢ gcd x y ∈ Ideal.span {gcd x y}

tactic: simp
state_before: case a
R : Type u
inst✝¹ : CommRing R
inst✝ : IsBezout R
x y : R
⊢ gcd x y ∈ {gcd x y}
Theorem: Set.preimage_const_sub_Ioc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iic, ← Ici_inter_Iio, inter_comm]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a - x) ⁻¹' Ioc b c = Ico (a - c) (a - b)
Theorem: MeasureTheory.Lp.nnnorm_neg
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: rw [nnnorm_def, nnnorm_def, snorm_congr_ae (coeFn_neg _), snorm_neg]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.416520
G : Type ?u.416523
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : { x // x ∈ Lp E p }
⊢ ‖-f‖₊ = ‖f‖₊
Theorem: Finset.product_union
File: Mathlib/Data/Finset/Prod.lean

tactic: ext ⟨x, y⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.73473
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
⊢ s ×ˢ (t ∪ t') = s ×ˢ t ∪ s ×ˢ t'

tactic: simp only [and_or_left, mem_union, mem_product]
state_before: case a.mk
α : Type u_1
β : Type u_2
γ : Type ?u.73473
s s' : Finset α
t t' : Finset β
a : α
b : β
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
x : α
y : β
⊢ (x, y) ∈ s ×ˢ (t ∪ t') ↔ (x, y) ∈ s ×ˢ t ∪ s ×ˢ t'
Theorem: Cubic.card_roots_le
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: apply (toFinset_card_le P.toPoly.roots).trans
state_before: R : Type u_1
S : Type ?u.686853
F : Type ?u.686856
K : Type ?u.686859
P : Cubic R
inst✝³ : CommRing R
inst✝² : CommRing S
φ : R →+* S
inst✝¹ : IsDomain R
inst✝ : DecidableEq R
⊢ Finset.card (toFinset (roots P)) ≤ 3

tactic: by_cases hP : P.toPoly = 0
state_before: R : Type u_1
S : Type ?u.686853
F : Type ?u.686856
K : Type ?u.686859
P : Cubic R
inst✝³ : CommRing R
inst✝² : CommRing S
φ : R →+* S
inst✝¹ : IsDomain R
inst✝ : DecidableEq R
⊢ ↑card (Polynomial.roots (toPoly P)) ≤ 3

tactic: exact (card_roots' P.toPoly).trans (by rw [hP, natDegree_zero]; exact zero_le 3)
state_before: case pos
R : Type u_1
S : Type ?u.686853
F : Type ?u.686856
K : Type ?u.686859
P : Cubic R
inst✝³ : CommRing R
inst✝² : CommRing S
φ : R →+* S
inst✝¹ : IsDomain R
inst✝ : DecidableEq R
hP : toPoly P = 0
⊢ ↑card (Polynomial.roots (toPoly P)) ≤ 3

tactic: rw [hP, natDegree_zero]
state_before: R : Type u_1
S : Type ?u.686853
F : Type ?u.686856
K : Type ?u.686859
P : Cubic R
inst✝³ : CommRing R
inst✝² : CommRing S
φ : R →+* S
inst✝¹ : IsDomain R
inst✝ : DecidableEq R
hP : toPoly P = 0
⊢ natDegree (toPoly P) ≤ 3

tactic: exact zero_le 3
state_before: R : Type u_1
S : Type ?u.686853
F : Type ?u.686856
K : Type ?u.686859
P : Cubic R
inst✝³ : CommRing R
inst✝² : CommRing S
φ : R →+* S
inst✝¹ : IsDomain R
inst✝ : DecidableEq R
hP : toPoly P = 0
⊢ 0 ≤ 3

tactic: exact WithBot.coe_le_coe.1 ((card_roots hP).trans degree_cubic_le)
state_before: case neg
R : Type u_1
S : Type ?u.686853
F : Type ?u.686856
K : Type ?u.686859
P : Cubic R
inst✝³ : CommRing R
inst✝² : CommRing S
φ : R →+* S
inst✝¹ : IsDomain R
inst✝ : DecidableEq R
hP : ¬toPoly P = 0
⊢ ↑card (Polynomial.roots (toPoly P)) ≤ 3
Theorem: CategoryTheory.Limits.inl_inl_pushoutAssoc_hom
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: trans f₁ ≫ l₁
state_before: C : Type u
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
W X Y Z X₁ X₂ X₃ Z₁ Z₂ : C
g₁ : Z₁ ⟶ X₁
g₂ : Z₁ ⟶ X₂
g₃ : Z₂ ⟶ X₂
g₄ : Z₂ ⟶ X₃
inst✝³ : HasPushout g₁ g₂
inst✝² : HasPushout g₃ g₄
inst✝¹ : HasPushout (g₃ ≫ pushout.inr) g₄
inst✝ : HasPushout g₁ (g₂ ≫ pushout.inl)
⊢ pushout.inl ≫ pushout.inl ≫ (pushoutAssoc g₁ g₂ g₃ g₄).hom = pushout.inl

tactic: congr 1
state_before: C : Type u
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
W X Y Z X₁ X₂ X₃ Z₁ Z₂ : C
g₁ : Z₁ ⟶ X₁
g₂ : Z₁ ⟶ X₂
g₃ : Z₂ ⟶ X₂
g₄ : Z₂ ⟶ X₃
inst✝³ : HasPushout g₁ g₂
inst✝² : HasPushout g₃ g₄
inst✝¹ : HasPushout (g₃ ≫ pushout.inr) g₄
inst✝ : HasPushout g₁ (g₂ ≫ pushout.inl)
⊢ pushout.inl ≫ pushout.inl ≫ (pushoutAssoc g₁ g₂ g₃ g₄).hom =
    pushout.inl ≫
      pushout.desc pushout.inl (pushout.inl ≫ pushout.inr) (_ : g₁ ≫ pushout.inl = g₂ ≫ pushout.inl ≫ pushout.inr)

tactic: exact
  (pushoutPushoutLeftIsPushout g₁ g₂ g₃ g₄).comp_coconePointUniqueUpToIso_hom _
    WalkingCospan.left
state_before: case e_a
C : Type u
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
W X Y Z X₁ X₂ X₃ Z₁ Z₂ : C
g₁ : Z₁ ⟶ X₁
g₂ : Z₁ ⟶ X₂
g₃ : Z₂ ⟶ X₂
g₄ : Z₂ ⟶ X₃
inst✝³ : HasPushout g₁ g₂
inst✝² : HasPushout g₃ g₄
inst✝¹ : HasPushout (g₃ ≫ pushout.inr) g₄
inst✝ : HasPushout g₁ (g₂ ≫ pushout.inl)
⊢ pushout.inl ≫ (pushoutAssoc g₁ g₂ g₃ g₄).hom =
    pushout.desc pushout.inl (pushout.inl ≫ pushout.inr) (_ : g₁ ≫ pushout.inl = g₂ ≫ pushout.inl ≫ pushout.inr)

tactic: exact pushout.inl_desc _ _ _
state_before: C : Type u
inst✝⁵ : Category C
D : Type u₂
inst✝⁴ : Category D
W X Y Z X₁ X₂ X₃ Z₁ Z₂ : C
g₁ : Z₁ ⟶ X₁
g₂ : Z₁ ⟶ X₂
g₃ : Z₂ ⟶ X₂
g₄ : Z₂ ⟶ X₃
inst✝³ : HasPushout g₁ g₂
inst✝² : HasPushout g₃ g₄
inst✝¹ : HasPushout (g₃ ≫ pushout.inr) g₄
inst✝ : HasPushout g₁ (g₂ ≫ pushout.inl)
⊢ pushout.inl ≫
      pushout.desc pushout.inl (pushout.inl ≫ pushout.inr) (_ : g₁ ≫ pushout.inl = g₂ ≫ pushout.inl ≫ pushout.inr) =
    pushout.inl
Theorem: Finset.fold_image_idem
File: Mathlib/Data/Finset/Fold.lean

tactic: induction' s using Finset.cons_induction with x xs hx ih
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
s : Finset γ
hi : IsIdempotent β op
⊢ fold op b f (image g s) = fold op b (f ∘ g) s

tactic: rw [fold_empty, image_empty, fold_empty]
state_before: case empty
α : Type u_1
β : Type u_3
γ : Type u_2
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
⊢ fold op b f (image g ∅) = fold op b (f ∘ g) ∅

tactic: haveI := Classical.decEq γ
state_before: case cons
α : Type u_1
β : Type u_3
γ : Type u_2
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
x : γ
xs : Finset γ
hx : ¬x ∈ xs
ih : fold op b f (image g xs) = fold op b (f ∘ g) xs
⊢ fold op b f (image g (cons x xs hx)) = fold op b (f ∘ g) (cons x xs hx)

tactic: rw [fold_cons, cons_eq_insert, image_insert, fold_insert_idem, ih]
state_before: case cons
α : Type u_1
β : Type u_3
γ : Type u_2
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
x : γ
xs : Finset γ
hx : ¬x ∈ xs
ih : fold op b f (image g xs) = fold op b (f ∘ g) xs
this : DecidableEq γ
⊢ fold op b f (image g (cons x xs hx)) = fold op b (f ∘ g) (cons x xs hx)

tactic: simp only [Function.comp_apply]
state_before: case cons
α : Type u_1
β : Type u_3
γ : Type u_2
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
x : γ
xs : Finset γ
hx : ¬x ∈ xs
ih : fold op b f (image g xs) = fold op b (f ∘ g) xs
this : DecidableEq γ
⊢ op (f (g x)) (fold op b (f ∘ g) xs) = op ((f ∘ g) x) (fold op b (f ∘ g) xs)
Theorem: IsClosedMap.of_inverse
File: Mathlib/Topology/Maps.lean

tactic: rw [image_eq_preimage_of_inverse r_inv l_inv]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.198659
δ : Type ?u.198662
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
f' : β → α
h : Continuous f'
l_inv : LeftInverse f f'
r_inv : Function.RightInverse f f'
s : Set α
hs : IsClosed s
⊢ IsClosed (f '' s)

tactic: exact hs.preimage h
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.198659
δ : Type ?u.198662
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
f' : β → α
h : Continuous f'
l_inv : LeftInverse f f'
r_inv : Function.RightInverse f f'
s : Set α
hs : IsClosed s
⊢ IsClosed (f' ⁻¹' s)