1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.ProbabilityMeasure.nonempty
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: by_contra maybe_empty
state_before: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
⊢ Nonempty Ω
state_after: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
⊢ False

tactic: have zero : (μ : Measure Ω) univ = 0 := by
  rw [univ_eq_empty_iff.mpr (not_nonempty_iff.mp maybe_empty), measure_empty]
state_before: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
⊢ False
state_after: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
zero : ↑μ univ = 0
⊢ False

tactic: rw [measure_univ] at zero
state_before: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
zero : ↑μ univ = 0
⊢ False
state_after: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
zero : 1 = 0
⊢ False

tactic: exact zero_ne_one zero.symm
state_before: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
zero : 1 = 0
⊢ False
state_after: no goals

tactic: rw [univ_eq_empty_iff.mpr (not_nonempty_iff.mp maybe_empty), measure_empty]
state_before: Ω : Type u_1
inst✝ : MeasurableSpace Ω
μ : ProbabilityMeasure Ω
maybe_empty : ¬Nonempty Ω
⊢ ↑μ univ = 0
state_after: no goals
Theorem: ProbabilityTheory.exponentialCDFReal_eq
File: Mathlib/Probability/Distributions/Exponential.lean

tactic: rw [exponentialCDFReal_eq_lintegral hr, lintegral_exponentialPDF_eq_antiDeriv hr x,
  ENNReal.toReal_ofReal_eq_iff]
state_before: r : ℝ
hr : 0 < r
x : ℝ
⊢ ↑(exponentialCDFReal r) x = if 0 ≤ x then 1 - rexp (-(r * x)) else 0
state_after: r : ℝ
hr : 0 < r
x : ℝ
⊢ 0 ≤ if 0 ≤ x then 1 - rexp (-(r * x)) else 0

tactic: split_ifs with h
state_before: r : ℝ
hr : 0 < r
x : ℝ
⊢ 0 ≤ if 0 ≤ x then 1 - rexp (-(r * x)) else 0
state_after: case pos
r : ℝ
hr : 0 < r
x : ℝ
h : 0 ≤ x
⊢ 0 ≤ 1 - rexp (-(r * x))

case neg
r : ℝ
hr : 0 < r
x : ℝ
h : ¬0 ≤ x
⊢ 0 ≤ 0

tactic: simp only [sub_nonneg, exp_le_one_iff, Left.neg_nonpos_iff, gt_iff_lt, ge_iff_le]
state_before: case pos
r : ℝ
hr : 0 < r
x : ℝ
h : 0 ≤ x
⊢ 0 ≤ 1 - rexp (-(r * x))
state_after: case pos
r : ℝ
hr : 0 < r
x : ℝ
h : 0 ≤ x
⊢ 0 ≤ r * x

tactic: exact mul_nonneg hr.le h
state_before: case pos
r : ℝ
hr : 0 < r
x : ℝ
h : 0 ≤ x
⊢ 0 ≤ r * x
state_after: no goals

tactic: exact le_rfl
state_before: case neg
r : ℝ
hr : 0 < r
x : ℝ
h : ¬0 ≤ x
⊢ 0 ≤ 0
state_after: no goals
Theorem: DFinsupp.card_Iic
File: Mathlib/Data/DFinsupp/Interval.lean

tactic: simp_rw [Iic_eq_Icc, card_Icc, DFinsupp.bot_eq_zero, support_zero, empty_union, zero_apply,
  bot_eq_zero]
state_before: ι : Type u_1
α : ι → Type u_2
inst✝³ : DecidableEq ι
inst✝² : (i : ι) → DecidableEq (α i)
inst✝¹ : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝ : (i : ι) → LocallyFiniteOrder (α i)
f : Π₀ (i : ι), α i
⊢ (Iic f).card = ∏ i ∈ f.support, (Iic (f i)).card
state_after: no goals
Theorem: Polynomial.degree_quadratic
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [add_assoc, degree_add_eq_left_of_degree_lt <| degree_linear_lt_degree_C_mul_X_sq ha,
  degree_C_mul_X_pow 2 ha]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ (C a * X ^ 2 + C b * X + C c).degree = 2
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ ↑2 = 2

tactic: rfl
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
ha : a ≠ 0
⊢ ↑2 = 2
state_after: no goals
Theorem: Finsupp.toDFinsupp_single
File: Mathlib/Data/Finsupp/ToDFinsupp.lean

tactic: ext
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
inst✝¹ : DecidableEq ι
inst✝ : Zero M
i : ι
m : M
⊢ (single i m).toDFinsupp = DFinsupp.single i m
state_after: case h
ι : Type u_1
R : Type u_2
M : Type u_3
inst✝¹ : DecidableEq ι
inst✝ : Zero M
i : ι
m : M
i✝ : ι
⊢ (single i m).toDFinsupp i✝ = (DFinsupp.single i m) i✝

tactic: simp [Finsupp.single_apply, DFinsupp.single_apply]
state_before: case h
ι : Type u_1
R : Type u_2
M : Type u_3
inst✝¹ : DecidableEq ι
inst✝ : Zero M
i : ι
m : M
i✝ : ι
⊢ (single i m).toDFinsupp i✝ = (DFinsupp.single i m) i✝
state_after: no goals
Theorem: SetTheory.PGame.birthday_zero_add
File: Mathlib/SetTheory/Game/Birthday.lean

tactic: simp
state_before: a b x : PGame
⊢ (0 + a).birthday = a.birthday
state_after: no goals
Theorem: LinearMap.toMvPolynomial_baseChange
File: Mathlib/Algebra/Module/LinearMap/Polynomial.lean

tactic: simp only [toMvPolynomial, toMatrix_baseChange, Matrix.toMvPolynomial_map]
state_before: R : Type u_1
M₁ : Type u_2
M₂ : Type u_3
ι₁ : Type u_4
ι₂ : Type u_5
inst✝⁹ : CommRing R
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : AddCommGroup M₂
inst✝⁶ : Module R M₁
inst✝⁵ : Module R M₂
inst✝⁴ : Fintype ι₁
inst✝³ : Finite ι₂
inst✝² : DecidableEq ι₁
b₁ : Basis ι₁ R M₁
b₂ : Basis ι₂ R M₂
f : M₁ →ₗ[R] M₂
i : ι₂
A : Type u_6
inst✝¹ : CommRing A
inst✝ : Algebra R A
⊢ toMvPolynomial (basis A b₁) (basis A b₂) (baseChange A f) i =
    (MvPolynomial.map (algebraMap R A)) (toMvPolynomial b₁ b₂ f i)
state_after: no goals
Theorem: Subspace.finrank_dualCoannihilator_eq
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [Submodule.dualCoannihilator, ← Module.evalEquiv_toLinearMap]
state_before: K : Type u
V : Type v
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
W : Subspace K V
inst✝ : FiniteDimensional K V
Φ : Subspace K (Module.Dual K V)
⊢ finrank K ↥(dualCoannihilator Φ) = finrank K ↥(dualAnnihilator Φ)
state_after: K : Type u
V : Type v
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
W : Subspace K V
inst✝ : FiniteDimensional K V
Φ : Subspace K (Module.Dual K V)
⊢ finrank K ↥(comap (↑(Module.evalEquiv K V)) (dualAnnihilator Φ)) = finrank K ↥(dualAnnihilator Φ)

tactic: exact LinearEquiv.finrank_eq (LinearEquiv.ofSubmodule' _ _)
state_before: K : Type u
V : Type v
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
W : Subspace K V
inst✝ : FiniteDimensional K V
Φ : Subspace K (Module.Dual K V)
⊢ finrank K ↥(comap (↑(Module.evalEquiv K V)) (dualAnnihilator Φ)) = finrank K ↥(dualAnnihilator Φ)
state_after: no goals
Theorem: CategoryTheory.Limits.coprod.map_comp_id
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp
state_before: C : Type u
inst✝³ : Category.{v, u} C
X✝ Y✝ X Y Z W : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝² : HasBinaryCoproduct Z W
inst✝¹ : HasBinaryCoproduct Y W
inst✝ : HasBinaryCoproduct X W
⊢ map (f ≫ g) (𝟙 W) = map f (𝟙 W) ≫ map g (𝟙 W)
state_after: no goals
Theorem: DihedralGroup.card_commute_odd
File: Mathlib/GroupTheory/SpecificGroups/Dihedral.lean

tactic: have hn' : NeZero n := ⟨hn.pos.ne'⟩
state_before: n : ℕ
hn : Odd n
⊢ Nat.card { p // Commute p.1 p.2 } = n * (n + 3)
state_after: n : ℕ
hn : Odd n
hn' : NeZero n
⊢ Nat.card { p // Commute p.1 p.2 } = n * (n + 3)

tactic: simp_rw [Nat.card_congr (OddCommuteEquiv hn), Nat.card_sum, Nat.card_prod, Nat.card_zmod]
state_before: n : ℕ
hn : Odd n
hn' : NeZero n
⊢ Nat.card { p // Commute p.1 p.2 } = n * (n + 3)
state_after: n : ℕ
hn : Odd n
hn' : NeZero n
⊢ n + (n + (n + n * n)) = n * (n + 3)

tactic: ring
state_before: n : ℕ
hn : Odd n
hn' : NeZero n
⊢ n + (n + (n + n * n)) = n * (n + 3)
state_after: no goals
Theorem: exists_signed_sum_aux
File: Mathlib/Data/Sign.lean

tactic: refine
  ⟨(Σ _ : { x // x ∈ s }, ℕ), Finset.univ.sigma fun a => range (f a).natAbs,
    fun a => sign (f a.1), fun a => a.1, fun a => a.1.2, ?_, ?_⟩
state_before: α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
⊢ ∃ β t sgn g,
    (∀ (b : β), g b ∈ s) ∧ t.card = ∑ a ∈ s, (f a).natAbs ∧ ∀ a ∈ s, (∑ b ∈ t, if g b = a then ↑(sgn b) else 0) = f a
state_after: case refine_1
α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
⊢ (univ.sigma fun a => range (f ↑a).natAbs).card = ∑ a ∈ s, (f a).natAbs

case refine_2
α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
⊢ ∀ a ∈ s,
    (∑ b ∈ univ.sigma fun a => range (f ↑a).natAbs,
        if (fun a => ↑a.fst) b = a then ↑((fun a => sign (f ↑a.fst)) b) else 0) =
      f a

tactic: simp [sum_attach (f := fun a => (f a).natAbs)]
state_before: case refine_1
α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
⊢ (univ.sigma fun a => range (f ↑a).natAbs).card = ∑ a ∈ s, (f a).natAbs
state_after: no goals

tactic: intro x hx
state_before: case refine_2
α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
⊢ ∀ a ∈ s,
    (∑ b ∈ univ.sigma fun a => range (f ↑a).natAbs,
        if (fun a => ↑a.fst) b = a then ↑((fun a => sign (f ↑a.fst)) b) else 0) =
      f a
state_after: case refine_2
α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
x : α
hx : x ∈ s
⊢ (∑ b ∈ univ.sigma fun a => range (f ↑a).natAbs,
      if (fun a => ↑a.fst) b = x then ↑((fun a => sign (f ↑a.fst)) b) else 0) =
    f x

tactic: simp [sum_sigma, hx, ← Int.sign_eq_sign, Int.sign_mul_abs, mul_comm |f _|,
  sum_attach (s := s) (f := fun y => if y = x then f y else 0)]
state_before: case refine_2
α✝ α : Type u_1
inst✝ : DecidableEq α
s : Finset α
f : α → ℤ
x : α
hx : x ∈ s
⊢ (∑ b ∈ univ.sigma fun a => range (f ↑a).natAbs,
      if (fun a => ↑a.fst) b = x then ↑((fun a => sign (f ↑a.fst)) b) else 0) =
    f x
state_after: no goals
Theorem: MvPolynomial.noZeroDivisors_of_finite
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: cases nonempty_fintype σ
state_before: R✝ : Type u
S : Type u_1
σ✝ : Type v
M : Type w
inst✝⁶ : CommRing R✝
inst✝⁵ : CommRing S
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
R : Type u
σ : Type v
inst✝² : CommSemiring R
inst✝¹ : Finite σ
inst✝ : NoZeroDivisors R
⊢ NoZeroDivisors (MvPolynomial σ R)
state_after: case intro
R✝ : Type u
S : Type u_1
σ✝ : Type v
M : Type w
inst✝⁶ : CommRing R✝
inst✝⁵ : CommRing S
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
R : Type u
σ : Type v
inst✝² : CommSemiring R
inst✝¹ : Finite σ
inst✝ : NoZeroDivisors R
val✝ : Fintype σ
⊢ NoZeroDivisors (MvPolynomial σ R)

tactic: haveI := noZeroDivisors_fin R (Fintype.card σ)
state_before: case intro
R✝ : Type u
S : Type u_1
σ✝ : Type v
M : Type w
inst✝⁶ : CommRing R✝
inst✝⁵ : CommRing S
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
R : Type u
σ : Type v
inst✝² : CommSemiring R
inst✝¹ : Finite σ
inst✝ : NoZeroDivisors R
val✝ : Fintype σ
⊢ NoZeroDivisors (MvPolynomial σ R)
state_after: case intro
R✝ : Type u
S : Type u_1
σ✝ : Type v
M : Type w
inst✝⁶ : CommRing R✝
inst✝⁵ : CommRing S
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
R : Type u
σ : Type v
inst✝² : CommSemiring R
inst✝¹ : Finite σ
inst✝ : NoZeroDivisors R
val✝ : Fintype σ
this : NoZeroDivisors (MvPolynomial (Fin (Fintype.card σ)) R)
⊢ NoZeroDivisors (MvPolynomial σ R)

tactic: exact (renameEquiv R (Fintype.equivFin σ)).injective.noZeroDivisors _ (map_zero _) (map_mul _)
state_before: case intro
R✝ : Type u
S : Type u_1
σ✝ : Type v
M : Type w
inst✝⁶ : CommRing R✝
inst✝⁵ : CommRing S
inst✝⁴ : AddCommGroup M
inst✝³ : Module R✝ M
R : Type u
σ : Type v
inst✝² : CommSemiring R
inst✝¹ : Finite σ
inst✝ : NoZeroDivisors R
val✝ : Fintype σ
this : NoZeroDivisors (MvPolynomial (Fin (Fintype.card σ)) R)
⊢ NoZeroDivisors (MvPolynomial σ R)
state_after: no goals
Theorem: MeasureTheory.Measure.compProd_add_right
File: Mathlib/Probability/Kernel/MeasureCompProd.lean

tactic: rw [Measure.compProd, kernel.prodMkLeft_add, kernel.compProd_add_right]
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ✝ : Measure α
κ✝ η✝ : ↥(kernel α β)
μ : Measure α
inst✝² : SFinite μ
κ η : ↥(kernel α β)
inst✝¹ : IsSFiniteKernel κ
inst✝ : IsSFiniteKernel η
⊢ μ ⊗ₘ (κ + η) = μ ⊗ₘ κ + μ ⊗ₘ η
state_after: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ✝ : Measure α
κ✝ η✝ : ↥(kernel α β)
μ : Measure α
inst✝² : SFinite μ
κ η : ↥(kernel α β)
inst✝¹ : IsSFiniteKernel κ
inst✝ : IsSFiniteKernel η
⊢ (kernel.const Unit μ ⊗ₖ kernel.prodMkLeft Unit κ + kernel.const Unit μ ⊗ₖ kernel.prodMkLeft Unit η) () =
    μ ⊗ₘ κ + μ ⊗ₘ η

tactic: rfl
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ✝ : Measure α
κ✝ η✝ : ↥(kernel α β)
μ : Measure α
inst✝² : SFinite μ
κ η : ↥(kernel α β)
inst✝¹ : IsSFiniteKernel κ
inst✝ : IsSFiniteKernel η
⊢ (kernel.const Unit μ ⊗ₖ kernel.prodMkLeft Unit κ + kernel.const Unit μ ⊗ₖ kernel.prodMkLeft Unit η) () =
    μ ⊗ₘ κ + μ ⊗ₘ η
state_after: no goals
Theorem: ProbabilityTheory.kernel.comp_deterministic_eq_comap
File: Mathlib/Probability/Kernel/Composition.lean

tactic: ext a s hs
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : ↥(kernel α β)
hg : Measurable g
⊢ κ ∘ₖ deterministic g hg = comap κ g hg
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : ↥(kernel α β)
hg : Measurable g
a : γ
s : Set β
hs : MeasurableSet s
⊢ ((κ ∘ₖ deterministic g hg) a) s = ((comap κ g hg) a) s

tactic: simp_rw [comap_apply' _ _ _ s, comp_apply' _ _ _ hs, deterministic_apply hg a,
  lintegral_dirac' _ (kernel.measurable_coe κ hs)]
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
f : β → γ
g : γ → α
κ : ↥(kernel α β)
hg : Measurable g
a : γ
s : Set β
hs : MeasurableSet s
⊢ ((κ ∘ₖ deterministic g hg) a) s = ((comap κ g hg) a) s
state_after: no goals
Theorem: Matroid.eq_of_restrictSubtype_eq
File: Mathlib/Data/Matroid/Map.lean

tactic: subst hM
state_before: α : Type u_1
β : Type u_2
f : α → β
E✝ I✝ s : Set α
M✝ : Matroid α
N✝ : Matroid β
E X I : Set α
M N : Matroid α
hM : M.E = E
hN : N.E = E
h : M.restrictSubtype E = N.restrictSubtype E
⊢ M = N
state_after: α : Type u_1
β : Type u_2
f : α → β
E I✝ s : Set α
M✝ : Matroid α
N✝ : Matroid β
X I : Set α
M N : Matroid α
hN : N.E = M.E
h : M.restrictSubtype M.E = N.restrictSubtype M.E
⊢ M = N

tactic: refine eq_of_indep_iff_indep_forall (by rw [hN]) (fun I hI ↦ ?_)
state_before: α : Type u_1
β : Type u_2
f : α → β
E I✝ s : Set α
M✝ : Matroid α
N✝ : Matroid β
X I : Set α
M N : Matroid α
hN : N.E = M.E
h : M.restrictSubtype M.E = N.restrictSubtype M.E
⊢ M = N
state_after: α : Type u_1
β : Type u_2
f : α → β
E I✝¹ s : Set α
M✝ : Matroid α
N✝ : Matroid β
X I✝ : Set α
M N : Matroid α
hN : N.E = M.E
h : M.restrictSubtype M.E = N.restrictSubtype M.E
I : Set α
hI : I ⊆ M.E
⊢ M.Indep I ↔ N.Indep I

tactic: rwa [← restrictSubtype_indep_iff_of_subset hI, h, restrictSubtype_indep_iff_of_subset]
state_before: α : Type u_1
β : Type u_2
f : α → β
E I✝¹ s : Set α
M✝ : Matroid α
N✝ : Matroid β
X I✝ : Set α
M N : Matroid α
hN : N.E = M.E
h : M.restrictSubtype M.E = N.restrictSubtype M.E
I : Set α
hI : I ⊆ M.E
⊢ M.Indep I ↔ N.Indep I
state_after: no goals

tactic: rw [hN]
state_before: α : Type u_1
β : Type u_2
f : α → β
E I✝ s : Set α
M✝ : Matroid α
N✝ : Matroid β
X I : Set α
M N : Matroid α
hN : N.E = M.E
h : M.restrictSubtype M.E = N.restrictSubtype M.E
⊢ M.E = N.E
state_after: no goals
Theorem: EReal.sign_mul_inv_abs'
File: Mathlib/Data/Real/EReal.lean

tactic: simp
state_before: case h_top

⊢ ↑(sign ⊤) * ↑⊤.abs⁻¹ = ⊤⁻¹
state_after: no goals

tactic: rcases lt_trichotomy a 0 with (a_neg | rfl | a_pos)
state_before: case h_real
a : ℝ
⊢ ↑(sign ↑a) * ↑(↑a).abs⁻¹ = (↑a)⁻¹
state_after: case h_real.inl
a : ℝ
a_neg : a < 0
⊢ ↑(sign ↑a) * ↑(↑a).abs⁻¹ = (↑a)⁻¹

case h_real.inr.inl

⊢ ↑(sign ↑0) * ↑(↑0).abs⁻¹ = (↑0)⁻¹

case h_real.inr.inr
a : ℝ
a_pos : 0 < a
⊢ ↑(sign ↑a) * ↑(↑a).abs⁻¹ = (↑a)⁻¹

tactic: rw [sign_coe, _root_.sign_neg a_neg, coe_neg_one, neg_one_mul, abs_def a,
  ← ofReal_inv_of_pos (abs_pos_of_neg a_neg), coe_ennreal_ofReal,
  max_eq_left (inv_nonneg.2 (abs_nonneg a)), ← coe_neg |a|⁻¹, ← coe_inv a, abs_of_neg a_neg,
  ← _root_.inv_neg, neg_neg]
state_before: case h_real.inl
a : ℝ
a_neg : a < 0
⊢ ↑(sign ↑a) * ↑(↑a).abs⁻¹ = (↑a)⁻¹
state_after: no goals

tactic: simp
state_before: case h_real.inr.inl

⊢ ↑(sign ↑0) * ↑(↑0).abs⁻¹ = (↑0)⁻¹
state_after: no goals

tactic: rw [sign_coe, _root_.sign_pos a_pos, SignType.coe_one, one_mul, abs_def a,
  ← ofReal_inv_of_pos (abs_pos_of_pos a_pos), coe_ennreal_ofReal,
    max_eq_left (inv_nonneg.2 (abs_nonneg a)), ← coe_inv a]
state_before: case h_real.inr.inr
a : ℝ
a_pos : 0 < a
⊢ ↑(sign ↑a) * ↑(↑a).abs⁻¹ = (↑a)⁻¹
state_after: case h_real.inr.inr
a : ℝ
a_pos : 0 < a
⊢ ↑|a|⁻¹ = ↑a⁻¹

tactic: congr
state_before: case h_real.inr.inr
a : ℝ
a_pos : 0 < a
⊢ ↑|a|⁻¹ = ↑a⁻¹
state_after: case h_real.inr.inr.e_a.e_a
a : ℝ
a_pos : 0 < a
⊢ |a| = a

tactic: exact abs_of_pos a_pos
state_before: case h_real.inr.inr.e_a.e_a
a : ℝ
a_pos : 0 < a
⊢ |a| = a
state_after: no goals
Theorem: FractionalIdeal.zero_of_num_eq_bot
File: Mathlib/RingTheory/FractionalIdeal/Basic.lean

tactic: rw [← coeToSubmodule_eq_bot, eq_bot_iff]
state_before: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
⊢ I = 0
state_after: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
⊢ ↑I ≤ ⊥

tactic: intro x hx
state_before: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
⊢ ↑I ≤ ⊥
state_after: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
⊢ x ∈ ⊥

tactic: suffices (den I : R) • x = 0 from
  (smul_eq_zero.mp this).resolve_left (ne_of_mem_of_not_mem (SetLike.coe_mem _) hS)
state_before: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
⊢ x ∈ ⊥
state_after: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
⊢ ↑I.den • x = 0

tactic: have h_eq : I.den • (I : Submodule R P) = ⊥ := by rw [den_mul_self_eq_num, hI, Submodule.map_bot]
state_before: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
⊢ ↑I.den • x = 0
state_after: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
h_eq : I.den • ↑I = ⊥
⊢ ↑I.den • x = 0

tactic: exact (Submodule.eq_bot_iff _).mp h_eq (den I • x) ⟨x, hx, rfl⟩
state_before: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
h_eq : I.den • ↑I = ⊥
⊢ ↑I.den • x = 0
state_after: no goals

tactic: rw [den_mul_self_eq_num, hI, Submodule.map_bot]
state_before: R : Type u_1
inst✝³ : CommRing R
S : Submonoid R
P : Type u_2
inst✝² : CommRing P
inst✝¹ : Algebra R P
loc : IsLocalization S P
inst✝ : NoZeroSMulDivisors R P
hS : 0 ∉ S
I : FractionalIdeal S P
hI : I.num = ⊥
x : P
hx : x ∈ ↑I
⊢ I.den • ↑I = ⊥
state_after: no goals
Theorem: sign_sum
File: Mathlib/Data/Sign.lean

tactic: cases t
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
t : SignType
h : ∀ i ∈ s, sign (f i) = t
⊢ sign (∑ i ∈ s, f i) = t
state_after: case zero
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, sign (f i) = zero
⊢ sign (∑ i ∈ s, f i) = zero

case neg
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, sign (f i) = neg
⊢ sign (∑ i ∈ s, f i) = neg

case pos
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, sign (f i) = pos
⊢ sign (∑ i ∈ s, f i) = pos

tactic: simp_rw [zero_eq_zero, sign_eq_zero_iff] at h ⊢
state_before: case zero
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, sign (f i) = zero
⊢ sign (∑ i ∈ s, f i) = zero
state_after: case zero
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, f i = 0
⊢ ∑ i ∈ s, f i = 0

tactic: exact Finset.sum_eq_zero h
state_before: case zero
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, f i = 0
⊢ ∑ i ∈ s, f i = 0
state_after: no goals

tactic: simp_rw [neg_eq_neg_one, sign_eq_neg_one_iff] at h ⊢
state_before: case neg
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, sign (f i) = neg
⊢ sign (∑ i ∈ s, f i) = neg
state_after: case neg
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, f i < 0
⊢ ∑ i ∈ s, f i < 0

tactic: exact Finset.sum_neg h hs
state_before: case neg
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, f i < 0
⊢ ∑ i ∈ s, f i < 0
state_after: no goals

tactic: simp_rw [pos_eq_one, sign_eq_one_iff] at h ⊢
state_before: case pos
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, sign (f i) = pos
⊢ sign (∑ i ∈ s, f i) = pos
state_after: case pos
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, 0 < f i
⊢ 0 < ∑ i ∈ s, f i

tactic: exact Finset.sum_pos h hs
state_before: case pos
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
ι : Type u_2
s : Finset ι
f : ι → α
hs : s.Nonempty
h : ∀ i ∈ s, 0 < f i
⊢ 0 < ∑ i ∈ s, f i
state_after: no goals