1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Rat.add_nonneg
File: Mathlib/Algebra/Order/Ring/Rat.lean

tactic: have d₁0 : 0 < (d₁ : ℤ) := mod_cast Nat.pos_of_ne_zero h₁
state_before: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
⊢ 0 ≤ n₁ /. ↑d₁ → 0 ≤ n₂ /. ↑d₂ → 0 ≤ n₁ /. ↑d₁ + n₂ /. ↑d₂
state_after: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
⊢ 0 ≤ n₁ /. ↑d₁ → 0 ≤ n₂ /. ↑d₂ → 0 ≤ n₁ /. ↑d₁ + n₂ /. ↑d₂

tactic: have d₂0 : 0 < (d₂ : ℤ) := mod_cast Nat.pos_of_ne_zero h₂
state_before: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
⊢ 0 ≤ n₁ /. ↑d₁ → 0 ≤ n₂ /. ↑d₂ → 0 ≤ n₁ /. ↑d₁ + n₂ /. ↑d₂
state_after: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
⊢ 0 ≤ n₁ /. ↑d₁ → 0 ≤ n₂ /. ↑d₂ → 0 ≤ n₁ /. ↑d₁ + n₂ /. ↑d₂

tactic: simp only [d₁0, d₂0, h₁, h₂, mul_pos, divInt_nonneg_iff_of_pos_right, divInt_add_divInt, Ne,
  Nat.cast_eq_zero, not_false_iff]
state_before: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
⊢ 0 ≤ n₁ /. ↑d₁ → 0 ≤ n₂ /. ↑d₂ → 0 ≤ n₁ /. ↑d₁ + n₂ /. ↑d₂
state_after: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
⊢ 0 ≤ n₁ → 0 ≤ n₂ → 0 ≤ n₁ * ↑d₂ + n₂ * ↑d₁

tactic: intro n₁0 n₂0
state_before: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
⊢ 0 ≤ n₁ → 0 ≤ n₂ → 0 ≤ n₁ * ↑d₂ + n₂ * ↑d₁
state_after: a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
n₁0 : 0 ≤ n₁
n₂0 : 0 ≤ n₂
⊢ 0 ≤ n₁ * ↑d₂ + n₂ * ↑d₁

tactic: first |assumption|apply Int.ofNat_zero_le
state_before: case hb.hb
a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
n₁0 : 0 ≤ n₁
n₂0 : 0 ≤ n₂
⊢ 0 ≤ ↑d₁
state_after: no goals

tactic: assumption
state_before: case hb.ha
a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
n₁0 : 0 ≤ n₁
n₂0 : 0 ≤ n₂
⊢ 0 ≤ n₂
state_after: no goals

tactic: apply Int.ofNat_zero_le
state_before: case hb.hb
a b c p q : ℚ
n₁ : ℤ
d₁ : ℕ
h₁ : d₁ ≠ 0
n₂ : ℤ
d₂ : ℕ
h₂ : d₂ ≠ 0
d₁0 : 0 < ↑d₁
d₂0 : 0 < ↑d₂
n₁0 : 0 ≤ n₁
n₂0 : 0 ≤ n₂
⊢ 0 ≤ ↑d₁
state_after: no goals
Theorem: Zsqrtd.le_of_add_le_add_left
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simpa using Zsqrtd.add_le_add_left _ _ h (-c)
state_before: d : ℕ
a b c : ℤ√↑d
h : c + a ≤ c + b
⊢ a ≤ b
state_after: no goals
Theorem: Polynomial.sum_taylor_eq
File: Mathlib/Algebra/Polynomial/Taylor.lean

tactic: rw [← comp_eq_sum_left, sub_eq_add_neg, ← C_neg, ← taylor_apply, taylor_taylor, neg_add_self,
  taylor_zero]
state_before: R✝ : Type u_1
inst✝¹ : Semiring R✝
r✝ : R✝
f✝ : R✝[X]
R : Type u_2
inst✝ : CommRing R
f : R[X]
r : R
⊢ (((taylor r) f).sum fun i a => C a * (X - C r) ^ i) = f
state_after: no goals
Theorem: covariant_flip_iff
File: Mathlib/Algebra/Order/Monoid/Unbundled/Defs.lean

tactic: rw [IsSymmOp.flip_eq]
state_before: M : Type u_1
N : Type u_2
μ : M → N → N
r : N → N → Prop
mu : N → N → N
inst✝ : IsSymmOp N N mu
⊢ Covariant N N (flip mu) r ↔ Covariant N N mu r
state_after: no goals
Theorem: MeasureTheory.AEStronglyMeasurable.isSeparable_ae_range
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: refine ⟨range (hf.mk f), hf.stronglyMeasurable_mk.isSeparable_range, ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f g : α → β
hf : AEStronglyMeasurable f μ
⊢ ∃ t, IsSeparable t ∧ ∀ᵐ (x : α) ∂μ, f x ∈ t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f g : α → β
hf : AEStronglyMeasurable f μ
⊢ ∀ᵐ (x : α) ∂μ, f x ∈ range (AEStronglyMeasurable.mk f hf)

tactic: filter_upwards [hf.ae_eq_mk] with x hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f g : α → β
hf : AEStronglyMeasurable f μ
⊢ ∀ᵐ (x : α) ∂μ, f x ∈ range (AEStronglyMeasurable.mk f hf)
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f g : α → β
hf : AEStronglyMeasurable f μ
x : α
hx : f x = AEStronglyMeasurable.mk f hf x
⊢ f x ∈ range (AEStronglyMeasurable.mk f hf)

tactic: simp [hx]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
inst✝² : Countable ι
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f g : α → β
hf : AEStronglyMeasurable f μ
x : α
hx : f x = AEStronglyMeasurable.mk f hf x
⊢ f x ∈ range (AEStronglyMeasurable.mk f hf)
state_after: no goals
Theorem: NonUnitalSemiring.ext_iff
File: Mathlib/Algebra/Ring/Ext.lean

tactic: rintro rfl
state_before: R : Type u
inst₁ inst₂ : NonUnitalSemiring R
⊢ inst₁ = inst₂ → HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul
state_after: R : Type u
inst₁ : NonUnitalSemiring R
⊢ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul

tactic: constructor <;> rfl
state_before: R : Type u
inst₁ : NonUnitalSemiring R
⊢ HAdd.hAdd = HAdd.hAdd ∧ HMul.hMul = HMul.hMul
state_after: no goals
Theorem: Finset.biUnion_image_left
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
⊢ ↑(s.biUnion fun a => image (f a) t) = ↑(image₂ f s t)
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
⊢ ⋃ x ∈ ↑s, f x '' ↑t = image2 f ↑s ↑t

tactic: exact Set.iUnion_image_left _
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
⊢ ⋃ x ∈ ↑s, f x '' ↑t = image2 f ↑s ↑t
state_after: no goals
Theorem: ProbabilityTheory.kernel.prodMkRight_add
File: Mathlib/Probability/Kernel/Composition.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ η : ↥(kernel α β)
⊢ prodMkRight γ (κ + η) = prodMkRight γ κ + prodMkRight γ η
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ η : ↥(kernel α β)
a✝¹ : α × γ
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((prodMkRight γ (κ + η)) a✝¹) s✝ = ((prodMkRight γ κ + prodMkRight γ η) a✝¹) s✝

tactic: simp
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
δ : Type u_4
mδ : MeasurableSpace δ
γ : Type u_5
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ η : ↥(kernel α β)
a✝¹ : α × γ
s✝ : Set β
a✝ : MeasurableSet s✝
⊢ ((prodMkRight γ (κ + η)) a✝¹) s✝ = ((prodMkRight γ κ + prodMkRight γ η) a✝¹) s✝
state_after: no goals
Theorem: minpolyDiv_spec
File: Mathlib/FieldTheory/Minpoly/MinpolyDiv.lean

tactic: delta minpolyDiv
state_before: R : Type u_2
K : Type ?u.2887
L : Type ?u.2890
S : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : CommRing S
inst✝¹ : Algebra R S
inst✝ : Algebra K L
x : S
⊢ minpolyDiv R x * (X - C x) = map (algebraMap R S) (minpoly R x)
state_after: R : Type u_2
K : Type ?u.2887
L : Type ?u.2890
S : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : CommRing S
inst✝¹ : Algebra R S
inst✝ : Algebra K L
x : S
⊢ map (algebraMap R S) (minpoly R x) /ₘ (X - C x) * (X - C x) = map (algebraMap R S) (minpoly R x)

tactic: rw [mul_comm, mul_divByMonic_eq_iff_isRoot, IsRoot, eval_map, ← aeval_def, minpoly.aeval]
state_before: R : Type u_2
K : Type ?u.2887
L : Type ?u.2890
S : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : CommRing S
inst✝¹ : Algebra R S
inst✝ : Algebra K L
x : S
⊢ map (algebraMap R S) (minpoly R x) /ₘ (X - C x) * (X - C x) = map (algebraMap R S) (minpoly R x)
state_after: no goals
Theorem: CategoryTheory.shift_shiftFunctorCompIsoId_add_neg_self_inv_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: apply shift_shiftFunctorCompIsoId_inv_app
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddGroup A
inst✝ : HasShift C A
X✝ Y : C
f : X✝ ⟶ Y
n : A
X : C
⊢ (shiftFunctor C n).map ((shiftFunctorCompIsoId C n (-n) ⋯).inv.app X) =
    (shiftFunctorCompIsoId C (-n) n ⋯).inv.app ((shiftFunctor C n).obj X)
state_after: no goals
Theorem: Set.diff_singleton_eq_self
File: Mathlib/Data/Set/Basic.lean

tactic: simp [h]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a✝ b : α
s✝ s₁ s₂ t t₁ t₂ u : Set α
a : α
s : Set α
h : a ∉ s
⊢ Disjoint {a} s
state_after: no goals
Theorem: Set.range_list_get?
File: Mathlib/Data/Set/List.lean

tactic: rw [← range_list_get, ← range_comp]
state_before: α : Type u_1
β : Type u_2
l : List α
⊢ range l.get? = insert none (some '' {x | x ∈ l})
state_after: α : Type u_1
β : Type u_2
l : List α
⊢ range l.get? = insert none (range (some ∘ l.get))

tactic: refine (range_subset_iff.2 fun n => ?_).antisymm (insert_subset_iff.2 ⟨?_, ?_⟩)
state_before: α : Type u_1
β : Type u_2
l : List α
⊢ range l.get? = insert none (range (some ∘ l.get))
state_after: case refine_1
α : Type u_1
β : Type u_2
l : List α
n : ℕ
⊢ l.get? n ∈ insert none (range (some ∘ l.get))

case refine_2
α : Type u_1
β : Type u_2
l : List α
⊢ none ∈ range l.get?

case refine_3
α : Type u_1
β : Type u_2
l : List α
⊢ range (some ∘ l.get) ⊆ range l.get?

tactic: exacts [(le_or_lt l.length n).imp get?_eq_none.2 (fun hlt => ⟨⟨_, hlt⟩, (get?_eq_get hlt).symm⟩),
  ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 fun k => ⟨_, get?_eq_get _⟩]
state_before: case refine_1
α : Type u_1
β : Type u_2
l : List α
n : ℕ
⊢ l.get? n ∈ insert none (range (some ∘ l.get))

case refine_2
α : Type u_1
β : Type u_2
l : List α
⊢ none ∈ range l.get?

case refine_3
α : Type u_1
β : Type u_2
l : List α
⊢ range (some ∘ l.get) ⊆ range l.get?
state_after: no goals
Theorem: Function.Antiperiodic.even_zsmul_periodic
File: Mathlib/Algebra/Periodic.lean

tactic: rw [mul_comm, mul_zsmul, two_zsmul, ← two_nsmul]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝¹ : AddGroup α
inst✝ : InvolutiveNeg β
h : Antiperiodic f c
n : ℤ
⊢ Periodic f ((2 * n) • c)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝¹ : AddGroup α
inst✝ : InvolutiveNeg β
h : Antiperiodic f c
n : ℤ
⊢ Periodic f (n • 2 • c)

tactic: exact h.periodic.zsmul n
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x : α
inst✝¹ : AddGroup α
inst✝ : InvolutiveNeg β
h : Antiperiodic f c
n : ℤ
⊢ Periodic f (n • 2 • c)
state_after: no goals
Theorem: equivShrink_symm_inv
File: Mathlib/Logic/Small/Group.lean

tactic: rw [Equiv.inv_def]
state_before: α : Type u_1
inst✝¹ : Inv α
inst✝ : Small.{u_2, u_1} α
x : Shrink.{u_2, u_1} α
⊢ (equivShrink α).symm x⁻¹ = ((equivShrink α).symm x)⁻¹
state_after: α : Type u_1
inst✝¹ : Inv α
inst✝ : Small.{u_2, u_1} α
x : Shrink.{u_2, u_1} α
⊢ (equivShrink α).symm ((equivShrink α).symm.symm ((equivShrink α).symm x)⁻¹) = ((equivShrink α).symm x)⁻¹

tactic: simp
state_before: α : Type u_1
inst✝¹ : Inv α
inst✝ : Small.{u_2, u_1} α
x : Shrink.{u_2, u_1} α
⊢ (equivShrink α).symm ((equivShrink α).symm.symm ((equivShrink α).symm x)⁻¹) = ((equivShrink α).symm x)⁻¹
state_after: no goals
Theorem: CategoryTheory.SimplicialObject.δ_comp_σ_of_le
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

tactic: dsimp [δ, σ]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 2)
j : Fin (n + 1)
H : i ≤ j.castSucc
⊢ X.σ j.succ ≫ X.δ i.castSucc = X.δ i ≫ X.σ j
state_after: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 2)
j : Fin (n + 1)
H : i ≤ j.castSucc
⊢ X.map (SimplexCategory.σ j.succ).op ≫ X.map (SimplexCategory.δ i.castSucc).op =
    X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.σ j).op

tactic: simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_of_le H]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 2)
j : Fin (n + 1)
H : i ≤ j.castSucc
⊢ X.map (SimplexCategory.σ j.succ).op ≫ X.map (SimplexCategory.δ i.castSucc).op =
    X.map (SimplexCategory.δ i).op ≫ X.map (SimplexCategory.σ j).op
state_after: no goals
Theorem: Finset.Ioc_diff_Ioo_self
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: simp [← coe_inj, h]
state_before: ι : Type u_1
α : Type u_2
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidableEq α
h : a < b
⊢ Ioc a b \ Ioo a b = {b}
state_after: no goals
Theorem: ContinuousMap.inducing_comp
File: Mathlib/Topology/CompactOpen.lean

tactic: simp only [compactOpen_eq, induced_generateFrom_eq, image_image2, hg.setOf_isOpen,
  image2_image_right, MapsTo, mem_preimage, preimage_setOf_eq, comp_apply]
state_before: α : Type u_1
X : Type u_2
Y : Type u_3
Z : Type u_4
T : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace T
K : Set X
U : Set Y
g : C(Y, Z)
hg : Inducing ⇑g
⊢ compactOpen = induced g.comp compactOpen
state_after: no goals
Theorem: Ideal.smithCoeffs_ne_zero
File: Mathlib/LinearAlgebra/FreeModule/PID.lean

tactic: intro hi
state_before: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
⊢ smithCoeffs b I hI i ≠ 0
state_after: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
hi : smithCoeffs b I hI i = 0
⊢ False

tactic: apply Basis.ne_zero (Ideal.selfBasis b I hI) i
state_before: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
hi : smithCoeffs b I hI i = 0
⊢ False
state_after: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
hi : smithCoeffs b I hI i = 0
⊢ (selfBasis b I hI) i = 0

tactic: refine Subtype.coe_injective ?_
state_before: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
hi : smithCoeffs b I hI i = 0
⊢ (selfBasis b I hI) i = 0
state_after: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
hi : smithCoeffs b I hI i = 0
⊢ (fun a => ↑a) ((selfBasis b I hI) i) = (fun a => ↑a) 0

tactic: simp [hi]
state_before: ι : Type u_1
R : Type u_2
inst✝⁸ : CommRing R
inst✝⁷ : IsDomain R
inst✝⁶ : IsPrincipalIdealRing R
M : Type u_3
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
b✝ : ι → M
S : Type u_4
inst✝³ : CommRing S
inst✝² : IsDomain S
inst✝¹ : Algebra R S
inst✝ : Finite ι
b : Basis ι R S
I : Ideal S
hI : I ≠ ⊥
i : ι
hi : smithCoeffs b I hI i = 0
⊢ (fun a => ↑a) ((selfBasis b I hI) i) = (fun a => ↑a) 0
state_after: no goals
Theorem: Finite.surjective_of_injective
File: Mathlib/Data/Fintype/Card.lean

tactic: intro x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
⊢ Surjective f
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
⊢ ∃ a, f a = x

tactic: have := Classical.propDecidable
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
⊢ ∃ a, f a = x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
⊢ ∃ a, f a = x

tactic: cases nonempty_fintype α
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
⊢ ∃ a, f a = x
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
⊢ ∃ a, f a = x

tactic: have h₁ : image f univ = univ :=
  eq_of_subset_of_card_le (subset_univ _)
    ((card_image_of_injective univ hinj).symm ▸ le_rfl)
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
⊢ ∃ a, f a = x
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
h₁ : image f univ = univ
⊢ ∃ a, f a = x

tactic: have h₂ : x ∈ image f univ := h₁.symm ▸ mem_univ x
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
h₁ : image f univ = univ
⊢ ∃ a, f a = x
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
h₁ : image f univ = univ
h₂ : x ∈ image f univ
⊢ ∃ a, f a = x

tactic: obtain ⟨y, h⟩ := mem_image.1 h₂
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
h₁ : image f univ = univ
h₂ : x ∈ image f univ
⊢ ∃ a, f a = x
state_after: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
h₁ : image f univ = univ
h₂ : x ∈ image f univ
y : α
h : y ∈ univ ∧ f y = x
⊢ ∃ a, f a = x

tactic: exact ⟨y, h.2⟩
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : Finite α
f : α → α
hinj : Injective f
x : α
this : (a : Prop) → Decidable a
val✝ : Fintype α
h₁ : image f univ = univ
h₂ : x ∈ image f univ
y : α
h : y ∈ univ ∧ f y = x
⊢ ∃ a, f a = x
state_after: no goals
Theorem: pow_le_pow_right'
File: Mathlib/Algebra/Order/Monoid/Unbundled/Pow.lean

tactic: rw [← hk, pow_add]
state_before: β : Type u_1
G : Type u_2
M : Type u_3
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
x a : M
n m : ℕ
ha : 1 ≤ a
h : n ≤ m
k : ℕ
hk : n + k = m
⊢ a ^ n * a ^ k = a ^ m
state_after: no goals
Theorem: CategoryTheory.Arrow.left_hom_inv_right
File: Mathlib/CategoryTheory/Comma/Arrow.lean

tactic: simp only [← Category.assoc, IsIso.comp_inv_eq, w]
state_before: T : Type u
inst✝¹ : Category.{v, u} T
f g : Arrow T
sq : f ⟶ g
inst✝ : IsIso sq
⊢ sq.left ≫ g.hom ≫ inv sq.right = f.hom
state_after: no goals
Theorem: MeasureTheory.pdf.IsUniform.pdf_eq_zero_of_measure_eq_zero_or_top
File: Mathlib/Probability/Distributions/Uniform.lean

tactic: rcases hμs with H|H
state_before: E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hu : IsUniform X s ℙ μ
hμs : μ s = 0 ∨ μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] 0
state_after: case inl
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hu : IsUniform X s ℙ μ
H : μ s = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] 0

case inr
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hu : IsUniform X s ℙ μ
H : μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] 0

tactic: simp only [IsUniform, ProbabilityTheory.cond, H, ENNReal.inv_zero, restrict_eq_zero.mpr H,
smul_zero] at hu
state_before: case inl
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hu : IsUniform X s ℙ μ
H : μ s = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] 0
state_after: case inl
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
H : μ s = 0
hu : Measure.map X ℙ = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] 0

tactic: simp [pdf, hu]
state_before: case inl
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
H : μ s = 0
hu : Measure.map X ℙ = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] 0
state_after: no goals

tactic: simp only [IsUniform, ProbabilityTheory.cond, H, ENNReal.inv_top, zero_smul] at hu
state_before: case inr
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
hu : IsUniform X s ℙ μ
H : μ s = ⊤
⊢ pdf X ℙ μ =ᶠ[ae μ] 0
state_after: case inr
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
H : μ s = ⊤
hu : Measure.map X ℙ = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] 0

tactic: simp [pdf, hu]
state_before: case inr
E : Type u_1
inst✝ : MeasurableSpace E
m μ : Measure E
Ω : Type u_2
x✝ : MeasurableSpace Ω
ℙ : Measure Ω
X : Ω → E
s : Set E
H : μ s = ⊤
hu : Measure.map X ℙ = 0
⊢ pdf X ℙ μ =ᶠ[ae μ] 0
state_after: no goals