1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: PNat.card_Ioc
File: Mathlib/Data/PNat/Interval.lean

tactic: rw [← Nat.card_Ioc]
state_before: a b : ℕ+
⊢ (Ioc a b).card = ↑b - ↑a
state_after: a b : ℕ+
⊢ (Ioc a b).card = (Ioc ↑a ↑b).card

tactic: erw [← Finset.map_subtype_embedding_Ioc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]
state_before: a b : ℕ+
⊢ (Ioc a b).card = (Ioc ↑a ↑b).card
state_after: a b : ℕ+
⊢ (Ioc a b).card = (map (Embedding.subtype fun n => 0 < n) (Ioc a b)).card

tactic: rw [card_map]
state_before: a b : ℕ+
⊢ (Ioc a b).card = (map (Embedding.subtype fun n => 0 < n) (Ioc a b)).card
state_after: no goals
Theorem: CategoryTheory.Limits.coyonedaOpColimitIsoLimitCoyoneda_hom_comp_π
File: Mathlib/CategoryTheory/Limits/IndYoneda.lean

tactic: simp only [coyonedaOpColimitIsoLimitCoyoneda, Functor.mapIso_symm,
  Iso.trans_hom, Iso.symm_hom, Functor.mapIso_inv, Category.assoc, preservesLimitsIso_hom_π,
  ← Functor.map_comp, limitOpIsoOpColimit_inv_comp_π]
state_before: C : Type u₁
inst✝² : Category.{u₂, u₁} C
I : Type v₁
inst✝¹ : Category.{v₂, v₁} I
F : I ⥤ C
inst✝ : HasColimit F
i : I
⊢ (coyonedaOpColimitIsoLimitCoyoneda F).hom ≫ limit.π (F.op ⋙ coyoneda) { unop := i } = coyoneda.map (colimit.ι F i).op
state_after: no goals
Theorem: gauge_gaugeRescale
File: Mathlib/Analysis/Convex/GaugeRescale.lean

tactic: rcases eq_or_ne x 0 with rfl | hx
state_before: E : Type u_1
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : TopologicalSpace E
inst✝ : T1Space E
s t : Set E
hta : Absorbent ℝ t
htb : IsVonNBounded ℝ t
x : E
⊢ gauge t (gaugeRescale s t x) = gauge s x
state_after: case inl
E : Type u_1
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : TopologicalSpace E
inst✝ : T1Space E
s t : Set E
hta : Absorbent ℝ t
htb : IsVonNBounded ℝ t
⊢ gauge t (gaugeRescale s t 0) = gauge s 0

case inr
E : Type u_1
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : TopologicalSpace E
inst✝ : T1Space E
s t : Set E
hta : Absorbent ℝ t
htb : IsVonNBounded ℝ t
x : E
hx : x ≠ 0
⊢ gauge t (gaugeRescale s t x) = gauge s x

tactic: simp
state_before: case inl
E : Type u_1
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : TopologicalSpace E
inst✝ : T1Space E
s t : Set E
hta : Absorbent ℝ t
htb : IsVonNBounded ℝ t
⊢ gauge t (gaugeRescale s t 0) = gauge s 0
state_after: no goals

tactic: exact gauge_gaugeRescale' s ((gauge_pos hta htb).2 hx).ne'
state_before: case inr
E : Type u_1
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : TopologicalSpace E
inst✝ : T1Space E
s t : Set E
hta : Absorbent ℝ t
htb : IsVonNBounded ℝ t
x : E
hx : x ≠ 0
⊢ gauge t (gaugeRescale s t x) = gauge s x
state_after: no goals
Theorem: Real.sinh_sub_cosh
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← neg_sub, cosh_sub_sinh]
state_before: x y : ℝ
⊢ sinh x - cosh x = -rexp (-x)
state_after: no goals
Theorem: Basis.dualBasis_apply_self
File: Mathlib/LinearAlgebra/Dual.lean

tactic: convert b.toDual_apply i j using 2
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ (b.dualBasis i) (b j) = if j = i then 1 else 0
state_after: case h.e'_3.h₁.a
R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ j = i ↔ i = j

tactic: rw [@eq_comm _ j i]
state_before: case h.e'_3.h₁.a
R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ j = i ↔ i = j
state_after: no goals
Theorem: Real.ceil_logb_natCast
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: obtain rfl | hr := hr.eq_or_lt
state_before: b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr : 0 ≤ r
⊢ ⌈logb (↑b) r⌉ = Int.clog b r
state_after: case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌈logb (↑b) 0⌉ = Int.clog b 0

case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌈logb (↑b) r⌉ = Int.clog b r

tactic: have hb1' : 1 < (b : ℝ) := Nat.one_lt_cast.mpr hb
state_before: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
⊢ ⌈logb (↑b) r⌉ = Int.clog b r
state_after: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌈logb (↑b) r⌉ = Int.clog b r

tactic: apply le_antisymm
state_before: case inr
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌈logb (↑b) r⌉ = Int.clog b r
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌈logb (↑b) r⌉ ≤ Int.clog b r

case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.clog b r ≤ ⌈logb (↑b) r⌉

tactic: rw [logb_zero, Int.clog_zero_right, Int.ceil_zero]
state_before: case inl
b✝ x y : ℝ
b : ℕ
hb : 1 < b
hr : 0 ≤ 0
⊢ ⌈logb (↑b) 0⌉ = Int.clog b 0
state_after: no goals

tactic: rw [Int.ceil_le, logb_le_iff_le_rpow hb1' hr, rpow_intCast]
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ⌈logb (↑b) r⌉ ≤ Int.clog b r
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ r ≤ ↑b ^ Int.clog b r

tactic: exact Int.self_le_zpow_clog hb r
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ r ≤ ↑b ^ Int.clog b r
state_after: no goals

tactic: rw [← Int.le_zpow_iff_clog_le hb hr, ← rpow_intCast b]
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ Int.clog b r ≤ ⌈logb (↑b) r⌉
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ r ≤ ↑b ^ ↑⌈logb (↑b) r⌉

tactic: refine (rpow_logb (zero_lt_one.trans hb1') hb1'.ne' hr).symm.trans_le ?_
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ r ≤ ↑b ^ ↑⌈logb (↑b) r⌉
state_after: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ logb (↑b) r ≤ ↑b ^ ↑⌈logb (↑b) r⌉

tactic: exact rpow_le_rpow_of_exponent_le hb1'.le (Int.le_ceil _)
state_before: case inr.a
b✝ x y : ℝ
b : ℕ
r : ℝ
hb : 1 < b
hr✝ : 0 ≤ r
hr : 0 < r
hb1' : 1 < ↑b
⊢ ↑b ^ logb (↑b) r ≤ ↑b ^ ↑⌈logb (↑b) r⌉
state_after: no goals
Theorem: Finset.sup'_product_left
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp [@forall_swap _ γ]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝ : SemilatticeSup α
s : Finset β
H : s.Nonempty
f✝ : β → α
t : Finset γ
h : (s ×ˢ t).Nonempty
f : β × γ → α
a : α
⊢ (s ×ˢ t).sup' h f ≤ a ↔ (s.sup' ⋯ fun i => t.sup' ⋯ fun i' => f (i, i')) ≤ a
state_after: no goals
Theorem: Asymptotics.SuperpolynomialDecay.param_mul
File: Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean

tactic: simpa only [Set.mem_preimage, Pi.mul_apply, ← mul_assoc, ← pow_succ] using hx
state_before: α : Type u_1
β : Type u_2
l : Filter α
k f g g' : α → β
inst✝¹ : TopologicalSpace β
inst✝ : CommSemiring β
hf : SuperpolynomialDecay l k f
z : ℕ
s : Set β
hs : IsOpen s
hs0 : 0 ∈ s
x : α
hx : x ∈ (fun a => k a ^ (z + 1) * f a) ⁻¹' s
⊢ x ∈ (fun a => k a ^ z * (k * f) a) ⁻¹' s
state_after: no goals
Theorem: WeierstrassCurve.Affine.Equation.map
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

tactic: rw [Equation, map_polynomial, map_mapRingHom_evalEval, ← f.map_zero]
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
S : Type v
inst✝ : CommRing S
f : R →+* S
x y : R
h : W.Equation x y
⊢ Equation (WeierstrassCurve.map W f) (f x) (f y)
state_after: R : Type u
inst✝¹ : CommRing R
W : Affine R
S : Type v
inst✝ : CommRing S
f : R →+* S
x y : R
h : W.Equation x y
⊢ f (evalEval x y W.polynomial) = f 0

tactic: exact congr_arg f h
state_before: R : Type u
inst✝¹ : CommRing R
W : Affine R
S : Type v
inst✝ : CommRing S
f : R →+* S
x y : R
h : W.Equation x y
⊢ f (evalEval x y W.polynomial) = f 0
state_after: no goals
Theorem: Ordinal.le_self_nadd
File: Mathlib/SetTheory/Ordinal/NaturalOps.lean

tactic: simpa using nadd_le_nadd_left (Ordinal.zero_le b) a
state_before: a b : Ordinal.{u_1}
⊢ a ≤ a ♯ b
state_after: no goals
Theorem: Multiset.prod_X_sub_X_eq_sum_esymm
File: Mathlib/RingTheory/Polynomial/Vieta.lean

tactic: conv_lhs =>
  congr
  congr
  ext x
  rw [sub_eq_add_neg]
  rw [← map_neg C x]
state_before: R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun t => X - C t) s).prod = ∑ j ∈ Finset.range (card s + 1), (-1) ^ j * (C (s.esymm j) * X ^ (card s - j))
state_after: R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun x => X + C (-x)) s).prod = ∑ j ∈ Finset.range (card s + 1), (-1) ^ j * (C (s.esymm j) * X ^ (card s - j))

tactic: convert prod_X_add_C_eq_sum_esymm (map (fun t => -t) s) using 1
state_before: R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun x => X + C (-x)) s).prod = ∑ j ∈ Finset.range (card s + 1), (-1) ^ j * (C (s.esymm j) * X ^ (card s - j))
state_after: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun x => X + C (-x)) s).prod = (map (fun r => X + C r) (map (fun t => -t) s)).prod

case h.e'_3
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ ∑ j ∈ Finset.range (card s + 1), (-1) ^ j * (C (s.esymm j) * X ^ (card s - j)) =
    ∑ j ∈ Finset.range (card (map (fun t => -t) s) + 1),
      C ((map (fun t => -t) s).esymm j) * X ^ (card (map (fun t => -t) s) - j)

tactic: rw [map_map]
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun x => X + C (-x)) s).prod = (map (fun r => X + C r) (map (fun t => -t) s)).prod
state_after: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun x => X + C (-x)) s).prod = (map ((fun r => X + C r) ∘ fun t => -t) s).prod

tactic: rfl
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ (map (fun x => X + C (-x)) s).prod = (map ((fun r => X + C r) ∘ fun t => -t) s).prod
state_after: no goals

tactic: simp only [esymm_neg, card_map, mul_assoc, map_mul, map_pow, map_neg, map_one]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommRing R
s : Multiset R
⊢ ∑ j ∈ Finset.range (card s + 1), (-1) ^ j * (C (s.esymm j) * X ^ (card s - j)) =
    ∑ j ∈ Finset.range (card (map (fun t => -t) s) + 1),
      C ((map (fun t => -t) s).esymm j) * X ^ (card (map (fun t => -t) s) - j)
state_after: no goals
Theorem: MvPolynomial.degrees_pow
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

tactic: simpa using degrees_prod (Finset.range n) fun _ ↦ p
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q p : MvPolynomial σ R
n : ℕ
⊢ (p ^ n).degrees ≤ n • p.degrees
state_after: no goals
Theorem: IsLocalMinOn.hasFDerivWithinAt_eq_zero
File: Mathlib/Analysis/Calculus/LocalExtr/Basic.lean

tactic: simpa using h.neg.hasFDerivWithinAt_eq_zero hf.neg hy hy'
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
a : E
f' : E →L[ℝ] ℝ
s : Set E
h : IsLocalMinOn f s a
hf : HasFDerivWithinAt f f' s a
y : E
hy : y ∈ posTangentConeAt s a
hy' : -y ∈ posTangentConeAt s a
⊢ f' y = 0
state_after: no goals
Theorem: OrderMonoidWithZeroHom.cancel_right
File: Mathlib/Algebra/Order/Hom/Monoid.lean

tactic: congr
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
δ : Type u_5
inst✝⁷ : Preorder α
inst✝⁶ : Preorder β
inst✝⁵ : Preorder γ
inst✝⁴ : Preorder δ
inst✝³ : MulZeroOneClass α
inst✝² : MulZeroOneClass β
inst✝¹ : MulZeroOneClass γ
inst✝ : MulZeroOneClass δ
f✝ g : α →*₀o β
g₁ g₂ : β →*₀o γ
f : α →*₀o β
hf : Surjective ⇑f
x✝ : g₁ = g₂
⊢ g₁.comp f = g₂.comp f
state_after: no goals
Theorem: CochainComplex.mappingCone.inl_v_triangle_mor₃_f
File: Mathlib/Algebra/Homology/HomotopyCategory/Pretriangulated.lean

tactic: rw [← hpq, neg_add_cancel_right]
state_before: C : Type u_1
inst✝³ : Category.{?u.1822, u_1} C
inst✝² : Preadditive C
inst✝¹ : HasZeroObject C
inst✝ : HasBinaryBiproducts C
K L : CochainComplex C ℤ
φ : K ⟶ L
p q : ℤ
hpq : p + -1 = q
⊢ p = q + 1
state_after: no goals

tactic: simp [triangle, Cochain.rightShift_v _ 1 0 (zero_add 1) q q (add_zero q) p (by omega)]
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : Preadditive C
inst✝¹ : HasZeroObject C
inst✝ : HasBinaryBiproducts C
K L : CochainComplex C ℤ
φ : K ⟶ L
p q : ℤ
hpq : p + -1 = q
⊢ (inl φ).v p q hpq ≫ (triangle φ).mor₃.f q = -(K.shiftFunctorObjXIso 1 q p ⋯).inv
state_after: no goals

tactic: omega
state_before: C : Type u_1
inst✝³ : Category.{u_2, u_1} C
inst✝² : Preadditive C
inst✝¹ : HasZeroObject C
inst✝ : HasBinaryBiproducts C
K L : CochainComplex C ℤ
φ : K ⟶ L
p q : ℤ
hpq : p + -1 = q
⊢ q + 1 = p
state_after: no goals
Theorem: SetTheory.PGame.moveRight_neg'
File: Mathlib/SetTheory/Game/PGame.lean

tactic: cases x
state_before: xl xr : Type u
x : PGame
i : (-x).RightMoves
⊢ (-x).moveRight i = -x.moveLeft (toRightMovesNeg.symm i)
state_after: case mk
xl xr : Type u
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : (-mk α✝ β✝ a✝¹ a✝).RightMoves
⊢ (-mk α✝ β✝ a✝¹ a✝).moveRight i = -(mk α✝ β✝ a✝¹ a✝).moveLeft (toRightMovesNeg.symm i)

tactic: rfl
state_before: case mk
xl xr : Type u
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : (-mk α✝ β✝ a✝¹ a✝).RightMoves
⊢ (-mk α✝ β✝ a✝¹ a✝).moveRight i = -(mk α✝ β✝ a✝¹ a✝).moveLeft (toRightMovesNeg.symm i)
state_after: no goals
Theorem: Nat.mod_two_add_add_odd_mod_two
File: Mathlib/Algebra/Ring/Parity.lean

tactic: rw [even_iff.1 hm, odd_iff.1 (hm.add_odd hn)]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m✝ n✝ m n : ℕ
hn : Odd n
hm : Even m
⊢ m % 2 + (m + n) % 2 = 1
state_after: no goals

tactic: rw [odd_iff.1 hm, even_iff.1 (hm.add_odd hn)]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
m✝ n✝ m n : ℕ
hn : Odd n
hm : Odd m
⊢ m % 2 + (m + n) % 2 = 1
state_after: no goals
Theorem: AffineIndependent.eq_zero_of_sum_eq_zero_subtype
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: rw [← sum_attach] at hw₀ hw₁
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s✝ : Finset ι
w✝ w₁ w₂ : ι → k
p : ι → V
s : Finset V
hp : AffineIndependent k Subtype.val
w : V → k
hw₀ : ∑ x ∈ s, w x = 0
hw₁ : ∑ x ∈ s, w x • x = 0
⊢ ∀ x ∈ s, w x = 0
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s✝ : Finset ι
w✝ w₁ w₂ : ι → k
p : ι → V
s : Finset V
hp : AffineIndependent k Subtype.val
w : V → k
hw₀ : ∑ x ∈ s.attach, w ↑x = 0
hw₁ : ∑ x ∈ s.attach, w ↑x • ↑x = 0
⊢ ∀ x ∈ s, w x = 0

tactic: exact fun x hx ↦ hp.eq_zero_of_sum_eq_zero hw₀ hw₁ ⟨x, hx⟩ (mem_univ _)
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type u_4
s✝ : Finset ι
w✝ w₁ w₂ : ι → k
p : ι → V
s : Finset V
hp : AffineIndependent k Subtype.val
w : V → k
hw₀ : ∑ x ∈ s.attach, w ↑x = 0
hw₁ : ∑ x ∈ s.attach, w ↑x • ↑x = 0
⊢ ∀ x ∈ s, w x = 0
state_after: no goals
Theorem: Sum.bnot_isLeft
File: .lake/packages/batteries/Batteries/Data/Sum/Lemmas.lean

tactic: cases x <;> rfl
state_before: α : Type u_1
β : Type u_2
x : α ⊕ β
⊢ (!decide (x.isLeft = x.isRight)) = true
state_after: no goals
Theorem: PowerSeries.X_prime
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [← Ideal.span_singleton_prime]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ Prime X
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ (Ideal.span {X}).IsPrime

R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ X ≠ 0

tactic: exact span_X_isPrime
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ (Ideal.span {X}).IsPrime
state_after: no goals

tactic: intro h
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ X ≠ 0
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
h : X = 0
⊢ False

tactic: simpa [map_zero (coeff R 1)] using congr_arg (coeff R 1) h
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
h : X = 0
⊢ False
state_after: no goals
Theorem: Set.OrdConnected.image_real_toNNReal
File: Mathlib/Data/NNReal/Basic.lean

tactic: refine ⟨forall_mem_image.2 fun x hx => forall_mem_image.2 fun y hy z hz => ?_⟩
state_before: s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
⊢ (toNNReal '' s).OrdConnected
state_after: s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc x.toNNReal y.toNNReal
⊢ z ∈ toNNReal '' s

tactic: rcases le_total y 0 with hy₀ | hy₀
state_before: s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc x.toNNReal y.toNNReal
⊢ z ∈ toNNReal '' s
state_after: case inl
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc x.toNNReal y.toNNReal
hy₀ : y ≤ 0
⊢ z ∈ toNNReal '' s

case inr
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc x.toNNReal y.toNNReal
hy₀ : 0 ≤ y
⊢ z ∈ toNNReal '' s

tactic: rw [mem_Icc, Real.toNNReal_of_nonpos hy₀, nonpos_iff_eq_zero] at hz
state_before: case inl
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc x.toNNReal y.toNNReal
hy₀ : y ≤ 0
⊢ z ∈ toNNReal '' s
state_after: case inl
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : x.toNNReal ≤ z ∧ z = 0
hy₀ : y ≤ 0
⊢ z ∈ toNNReal '' s

tactic: exact ⟨y, hy, (toNNReal_of_nonpos hy₀).trans hz.2.symm⟩
state_before: case inl
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : x.toNNReal ≤ z ∧ z = 0
hy₀ : y ≤ 0
⊢ z ∈ toNNReal '' s
state_after: no goals

tactic: lift y to ℝ≥0 using hy₀
state_before: case inr
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
z : ℝ≥0
hz : z ∈ Icc x.toNNReal y.toNNReal
hy₀ : 0 ≤ y
⊢ z ∈ toNNReal '' s
state_after: case inr.intro
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
z y : ℝ≥0
hy : ↑y ∈ s
hz : z ∈ Icc x.toNNReal (↑y).toNNReal
⊢ z ∈ toNNReal '' s

tactic: rw [toNNReal_coe] at hz
state_before: case inr.intro
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
z y : ℝ≥0
hy : ↑y ∈ s
hz : z ∈ Icc x.toNNReal (↑y).toNNReal
⊢ z ∈ toNNReal '' s
state_after: case inr.intro
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
z y : ℝ≥0
hy : ↑y ∈ s
hz : z ∈ Icc x.toNNReal y
⊢ z ∈ toNNReal '' s

tactic: exact ⟨z, h.out hx hy ⟨toNNReal_le_iff_le_coe.1 hz.1, hz.2⟩, toNNReal_coe⟩
state_before: case inr.intro
s : Set ℝ
t : Set ℝ≥0
h : s.OrdConnected
x : ℝ
hx : x ∈ s
z y : ℝ≥0
hy : ↑y ∈ s
hz : z ∈ Icc x.toNNReal y
⊢ z ∈ toNNReal '' s
state_after: no goals
Theorem: Partrec.sum_casesOn_left
File: Mathlib/Computability/Partrec.lean

tactic: cases f a <;> simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β ⊕ γ
g : α → β →. σ
h : α → γ → σ
hf : Computable f
hg : Partrec₂ g
hh : Computable₂ h
a : α
⊢ Sum.casesOn (Sum.casesOn (f a) (fun b => Sum.inr (a, b).2) fun b => Sum.inl (a, b).2) (fun b => Part.some (h a b))
      (g a) =
    Sum.casesOn (f a) (g a) fun c => Part.some (h a c)
state_after: no goals
Theorem: Basis.linearMap_apply
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: erw [linearMap_repr_symm_apply, Finsupp.total_single, one_smul]
state_before: R : Type u_1
M : Type u_2
M₁ : Type u_3
M₂ : Type u_4
ι : Type u_5
ι₁ : Type u_6
ι₂ : Type u_7
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M₁
inst✝⁹ : AddCommMonoid M₂
inst✝⁸ : Module R M
inst✝⁷ : Module R M₁
inst✝⁶ : Module R M₂
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι₁
inst✝³ : Fintype ι₂
inst✝² : DecidableEq ι
inst✝¹ : DecidableEq ι₁
inst✝ : DecidableEq ι₂
b : Basis ι R M
b₁ : Basis ι₁ R M₁
b₂ : Basis ι₂ R M₂
ij : ι₂ × ι₁
⊢ (b₁.linearMap b₂) ij = (toLin b₁ b₂) ((Matrix.stdBasis R ι₂ ι₁) ij)
state_after: no goals
Theorem: Finset.inf_union
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp [or_imp, forall_and]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
ι : Type u_5
κ : Type u_6
inst✝² : SemilatticeInf α
inst✝¹ : OrderTop α
s s₁ s₂ : Finset β
f g : β → α
a : α
inst✝ : DecidableEq β
c : α
⊢ c ≤ (s₁ ∪ s₂).inf f ↔ c ≤ s₁.inf f ⊓ s₂.inf f
state_after: no goals
Theorem: compare_eq_iff_eq
File: Mathlib/Init/Order/Defs.lean

tactic: rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b = Ordering.eq ↔ a = b
state_after: α : Type u
inst✝ : LinearOrder α
a b : α
⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.eq ↔ a = b

tactic: split_ifs <;> try simp only
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.eq ↔ a = b
state_after: case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ False ↔ a = b

case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b

case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b

tactic: case _ h   => exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
state_before: case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : a < b
⊢ False ↔ a = b

case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b

case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b
state_after: case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b

case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b

tactic: case _ _ h => exact true_iff_iff.2 h
state_before: case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b

case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b
state_after: case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b

tactic: case _ _ h => exact false_iff_iff.2 h
state_before: case neg
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : ¬a = b
⊢ False ↔ a = b
state_after: no goals

tactic: simp only
state_before: case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ Ordering.eq = Ordering.eq ↔ a = b
state_after: case pos
α : Type u
inst✝ : LinearOrder α
a b : α
h✝¹ : ¬a < b
h✝ : a = b
⊢ True ↔ a = b

tactic: exact false_iff_iff.2 <| ne_iff_lt_or_gt.2 <| .inl h
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
h : a < b
⊢ False ↔ a = b
state_after: no goals

tactic: exact true_iff_iff.2 h
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : ¬a < b
h : a = b
⊢ True ↔ a = b
state_after: no goals

tactic: exact false_iff_iff.2 h
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
h✝ : ¬a < b
h : ¬a = b
⊢ False ↔ a = b
state_after: no goals
Theorem: Real.one_lt_rpow_iff_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [rpow_def_of_pos hx, one_lt_exp_iff, mul_pos_iff, log_pos_iff hx, log_neg_iff hx]
state_before: x y z : ℝ
n : ℕ
hx : 0 < x
⊢ 1 < x ^ y ↔ 1 < x ∧ 0 < y ∨ x < 1 ∧ y < 0
state_after: no goals
Theorem: Ordinal.add_absorp
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: rw [← Ordinal.add_sub_cancel_of_le h₂, ← add_assoc, add_omega_opow h₁]
state_before: a b c : Ordinal.{u_1}
h₁ : a < ω ^ b
h₂ : ω ^ b ≤ c
⊢ a + c = c
state_after: no goals
Theorem: Matrix.range_mulVecLin
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: rw [← vecMulLinear_transpose, range_vecMulLinear]
state_before: R : Type u_1
inst✝¹ : CommSemiring R
k : Type u_2
l : Type u_3
m : Type u_4
n : Type u_5
inst✝ : Fintype n
M : Matrix m n R
⊢ LinearMap.range M.mulVecLin = span R (Set.range Mᵀ)
state_after: no goals