1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Real.Lp_add_le
File: Mathlib/Analysis/MeanInequalities.lean

tactic: have :=
  NNReal.coe_le_coe.2
    (NNReal.Lp_add_le s (fun i => ⟨_, abs_nonneg (f i)⟩) (fun i => ⟨_, abs_nonneg (g i)⟩) hp)
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hp : 1 ≤ p
⊢ (∑ i ∈ s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) + (∑ i ∈ s, |g i| ^ p) ^ (1 / p)
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hp : 1 ≤ p
this :
  ↑((∑ i ∈ s, ((fun i => ⟨|f i|, ⋯⟩) i + (fun i => ⟨|g i|, ⋯⟩) i) ^ p) ^ (1 / p)) ≤
    ↑((∑ i ∈ s, (fun i => ⟨|f i|, ⋯⟩) i ^ p) ^ (1 / p) + (∑ i ∈ s, (fun i => ⟨|g i|, ⋯⟩) i ^ p) ^ (1 / p))
⊢ (∑ i ∈ s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) + (∑ i ∈ s, |g i| ^ p) ^ (1 / p)

tactic: push_cast at this
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hp : 1 ≤ p
this :
  ↑((∑ i ∈ s, ((fun i => ⟨|f i|, ⋯⟩) i + (fun i => ⟨|g i|, ⋯⟩) i) ^ p) ^ (1 / p)) ≤
    ↑((∑ i ∈ s, (fun i => ⟨|f i|, ⋯⟩) i ^ p) ^ (1 / p) + (∑ i ∈ s, (fun i => ⟨|g i|, ⋯⟩) i ^ p) ^ (1 / p))
⊢ (∑ i ∈ s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) + (∑ i ∈ s, |g i| ^ p) ^ (1 / p)
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hp : 1 ≤ p
this : (∑ x ∈ s, (|f x| + |g x|) ^ p) ^ (1 / p) ≤ (∑ x ∈ s, |f x| ^ p) ^ (1 / p) + (∑ x ∈ s, |g x| ^ p) ^ (1 / p)
⊢ (∑ i ∈ s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) + (∑ i ∈ s, |g i| ^ p) ^ (1 / p)

tactic: refine le_trans (rpow_le_rpow ?_ (sum_le_sum fun i _ => ?_) ?_) this <;>
  simp [sum_nonneg, rpow_nonneg, abs_nonneg, le_trans zero_le_one hp, abs_add,
    rpow_le_rpow]
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hp : 1 ≤ p
this : (∑ x ∈ s, (|f x| + |g x|) ^ p) ^ (1 / p) ≤ (∑ x ∈ s, |f x| ^ p) ^ (1 / p) + (∑ x ∈ s, |g x| ^ p) ^ (1 / p)
⊢ (∑ i ∈ s, |f i + g i| ^ p) ^ (1 / p) ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) + (∑ i ∈ s, |g i| ^ p) ^ (1 / p)
state_after: no goals
Theorem: Bool.ofNat_le_ofNat
File: Mathlib/Data/Bool/Basic.lean

tactic: simp only [ofNat, ne_eq, _root_.decide_not]
state_before: n m : Nat
h : n ≤ m
⊢ ofNat n ≤ ofNat m
state_after: n m : Nat
h : n ≤ m
⊢ (!decide (n = 0)) ≤ !decide (m = 0)

tactic: cases Nat.decEq n 0 with
| isTrue hn => rw [_root_.decide_eq_true hn]; exact Bool.false_le _
| isFalse hn =>
  cases Nat.decEq m 0 with
  | isFalse hm => rw [_root_.decide_eq_false hm]; exact Bool.le_true _
  | isTrue hm => subst hm; have h := Nat.le_antisymm h (Nat.zero_le n); contradiction
state_before: n m : Nat
h : n ≤ m
⊢ (!decide (n = 0)) ≤ !decide (m = 0)
state_after: no goals

tactic: rw [_root_.decide_eq_true hn]
state_before: case isTrue
n m : Nat
h : n ≤ m
hn : n = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)
state_after: case isTrue
n m : Nat
h : n ≤ m
hn : n = 0
⊢ (!true) ≤ !decide (m = 0)

tactic: exact Bool.false_le _
state_before: case isTrue
n m : Nat
h : n ≤ m
hn : n = 0
⊢ (!true) ≤ !decide (m = 0)
state_after: no goals

tactic: cases Nat.decEq m 0 with
| isFalse hm => rw [_root_.decide_eq_false hm]; exact Bool.le_true _
| isTrue hm => subst hm; have h := Nat.le_antisymm h (Nat.zero_le n); contradiction
state_before: case isFalse
n m : Nat
h : n ≤ m
hn : ¬n = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)
state_after: no goals

tactic: rw [_root_.decide_eq_false hm]
state_before: case isFalse.isFalse
n m : Nat
h : n ≤ m
hn : ¬n = 0
hm : ¬m = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)
state_after: case isFalse.isFalse
n m : Nat
h : n ≤ m
hn : ¬n = 0
hm : ¬m = 0
⊢ (!decide (n = 0)) ≤ !false

tactic: exact Bool.le_true _
state_before: case isFalse.isFalse
n m : Nat
h : n ≤ m
hn : ¬n = 0
hm : ¬m = 0
⊢ (!decide (n = 0)) ≤ !false
state_after: no goals

tactic: subst hm
state_before: case isFalse.isTrue
n m : Nat
h : n ≤ m
hn : ¬n = 0
hm : m = 0
⊢ (!decide (n = 0)) ≤ !decide (m = 0)
state_after: case isFalse.isTrue
n : Nat
hn : ¬n = 0
h : n ≤ 0
⊢ (!decide (n = 0)) ≤ !decide (0 = 0)

tactic: have h := Nat.le_antisymm h (Nat.zero_le n)
state_before: case isFalse.isTrue
n : Nat
hn : ¬n = 0
h : n ≤ 0
⊢ (!decide (n = 0)) ≤ !decide (0 = 0)
state_after: case isFalse.isTrue
n : Nat
hn : ¬n = 0
h✝ : n ≤ 0
h : n = 0
⊢ (!decide (n = 0)) ≤ !decide (0 = 0)

tactic: contradiction
state_before: case isFalse.isTrue
n : Nat
hn : ¬n = 0
h✝ : n ≤ 0
h : n = 0
⊢ (!decide (n = 0)) ≤ !decide (0 = 0)
state_after: no goals
Theorem: NNRat.num_div_den
File: Mathlib/Data/NNRat/Lemmas.lean

tactic: ext : 1
state_before: p q✝ q : ℚ≥0
⊢ ↑q.num / ↑q.den = q
state_after: case a
p q✝ q : ℚ≥0
⊢ ↑(↑q.num / ↑q.den) = ↑q

tactic: rw [coe_div, coe_natCast, coe_natCast, num, ← Int.cast_natCast,
  Int.natAbs_of_nonneg (Rat.num_nonneg.2 q.cast_nonneg)]
state_before: case a
p q✝ q : ℚ≥0
⊢ ↑(↑q.num / ↑q.den) = ↑q
state_after: case a
p q✝ q : ℚ≥0
⊢ ↑(↑q).num / ↑q.den = ↑q

tactic: exact Rat.num_div_den q
state_before: case a
p q✝ q : ℚ≥0
⊢ ↑(↑q).num / ↑q.den = ↑q
state_after: no goals
Theorem: Complex.cosh_two_mul
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [two_mul, cosh_add, sq, sq]
state_before: x y : ℂ
⊢ cosh (2 * x) = cosh x ^ 2 + sinh x ^ 2
state_after: no goals
Theorem: Ideal.maximal_of_no_maximal
File: Mathlib/RingTheory/Ideal/Basic.lean

tactic: by_contra hnonmax
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
P : Ideal α
hmax : ∀ (m : Ideal α), P < m → ¬m.IsMaximal
J : Ideal α
hPJ : P < J
⊢ J = ⊤
state_after: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
P : Ideal α
hmax : ∀ (m : Ideal α), P < m → ¬m.IsMaximal
J : Ideal α
hPJ : P < J
hnonmax : ¬J = ⊤
⊢ False

tactic: rcases exists_le_maximal J hnonmax with ⟨M, hM1, hM2⟩
state_before: α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
P : Ideal α
hmax : ∀ (m : Ideal α), P < m → ¬m.IsMaximal
J : Ideal α
hPJ : P < J
hnonmax : ¬J = ⊤
⊢ False
state_after: case intro.intro
α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
P : Ideal α
hmax : ∀ (m : Ideal α), P < m → ¬m.IsMaximal
J : Ideal α
hPJ : P < J
hnonmax : ¬J = ⊤
M : Ideal α
hM1 : M.IsMaximal
hM2 : J ≤ M
⊢ False

tactic: exact hmax M (lt_of_lt_of_le hPJ hM2) hM1
state_before: case intro.intro
α : Type u
β : Type v
inst✝ : Semiring α
I : Ideal α
a b : α
P : Ideal α
hmax : ∀ (m : Ideal α), P < m → ¬m.IsMaximal
J : Ideal α
hPJ : P < J
hnonmax : ¬J = ⊤
M : Ideal α
hM1 : M.IsMaximal
hM2 : J ≤ M
⊢ False
state_after: no goals
Theorem: CategoryTheory.Presheaf.isSheaf_iff_extensiveSheaf_of_projective
File: Mathlib/CategoryTheory/Sites/Coherent/SheafComparison.lean

tactic: rw [isSheaf_iff_preservesFiniteProducts_of_projective, isSheaf_iff_preservesFiniteProducts]
state_before: C : Type u_1
D : Type u_2
inst✝⁵ : Category.{u_3, u_1} C
inst✝⁴ : Category.{?u.45955, u_2} D
F✝ : C ⥤ D
A : Type u₃
inst✝³ : Category.{v₃, u₃} A
F : Cᵒᵖ ⥤ A
inst✝² : Preregular C
inst✝¹ : FinitaryExtensive C
inst✝ : ∀ (X : C), Projective X
⊢ IsSheaf (coherentTopology C) F ↔ IsSheaf (extensiveTopology C) F
state_after: no goals
Theorem: MvPolynomial.mem_coeffs_iff
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: simp [coeffs, eq_comm, (Finset.mem_image)]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
c : R
⊢ c ∈ p.coeffs ↔ ∃ n ∈ p.support, c = coeff n p
state_after: no goals
Theorem: Nat.cast_div_le
File: Mathlib/Data/Nat/Cast/Field.lean

tactic: cases n
state_before: α : Type u_1
inst✝ : LinearOrderedSemifield α
m n : ℕ
⊢ ↑(m / n) ≤ ↑m / ↑n
state_after: case zero
α : Type u_1
inst✝ : LinearOrderedSemifield α
m : ℕ
⊢ ↑(m / 0) ≤ ↑m / ↑0

case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)

tactic: rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le]
state_before: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ ↑(m / (n✝ + 1)) ≤ ↑m / ↑(n✝ + 1)
state_after: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ m / (n✝ + 1) * (n✝ + 1) ≤ m

case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ 0 < ↑(n✝ + 1)

tactic: rw [cast_zero, div_zero, Nat.div_zero, cast_zero]
state_before: case zero
α : Type u_1
inst✝ : LinearOrderedSemifield α
m : ℕ
⊢ ↑(m / 0) ≤ ↑m / ↑0
state_after: no goals

tactic: exact Nat.div_mul_le_self m _
state_before: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ m / (n✝ + 1) * (n✝ + 1) ≤ m
state_after: no goals

tactic: exact Nat.cast_pos.2 (Nat.succ_pos _)
state_before: case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ 0 < ↑(n✝ + 1)
state_after: no goals
Theorem: ENNReal.exists_nat_gt
File: Mathlib/Data/ENNReal/Basic.lean

tactic: lift r to ℝ≥0 using h
state_before: α : Type u_1
a b c d : ℝ≥0∞
r✝ p q : ℝ≥0
r : ℝ≥0∞
h : r ≠ ⊤
⊢ ∃ n, r < ↑n
state_after: case intro
α : Type u_1
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
⊢ ∃ n, ↑r < ↑n

tactic: rcases exists_nat_gt r with ⟨n, hn⟩
state_before: case intro
α : Type u_1
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
⊢ ∃ n, ↑r < ↑n
state_after: case intro.intro
α : Type u_1
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
n : ℕ
hn : r < ↑n
⊢ ∃ n, ↑r < ↑n

tactic: exact ⟨n, coe_lt_natCast.2 hn⟩
state_before: case intro.intro
α : Type u_1
a b c d : ℝ≥0∞
r✝ p q r : ℝ≥0
n : ℕ
hn : r < ↑n
⊢ ∃ n, ↑r < ↑n
state_after: no goals
Theorem: Multiset.map_add_right_Ioo
File: Mathlib/Algebra/Order/Interval/Multiset.lean

tactic: simp_rw [add_comm _ c]
state_before: α : Type u_1
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (fun x => x + c) (Ioo a b) = Ioo (a + c) (b + c)
state_after: α : Type u_1
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (fun x => c + x) (Ioo a b) = Ioo (c + a) (c + b)

tactic: exact map_add_left_Ioo _ _ _
state_before: α : Type u_1
inst✝² : OrderedCancelAddCommMonoid α
inst✝¹ : ExistsAddOfLE α
inst✝ : LocallyFiniteOrder α
a b c : α
⊢ map (fun x => c + x) (Ioo a b) = Ioo (c + a) (c + b)
state_after: no goals
Theorem: IntermediateField.adjoin.finrank
File: Mathlib/FieldTheory/Adjoin.lean

tactic: rw [PowerBasis.finrank (adjoin.powerBasis hx : _)]
state_before: F : Type u_1
inst✝⁶ : Field F
E : Type u_2
inst✝⁵ : Field E
inst✝⁴ : Algebra F E
α : E
K : Type u
inst✝³ : Field K
inst✝² : Algebra F K
L : Type u_3
inst✝¹ : Field L
inst✝ : Algebra K L
x : L
hx : IsIntegral K x
⊢ FiniteDimensional.finrank K ↥K⟮x⟯ = (minpoly K x).natDegree
state_after: F : Type u_1
inst✝⁶ : Field F
E : Type u_2
inst✝⁵ : Field E
inst✝⁴ : Algebra F E
α : E
K : Type u
inst✝³ : Field K
inst✝² : Algebra F K
L : Type u_3
inst✝¹ : Field L
inst✝ : Algebra K L
x : L
hx : IsIntegral K x
⊢ (powerBasis hx).dim = (minpoly K x).natDegree

tactic: rfl
state_before: F : Type u_1
inst✝⁶ : Field F
E : Type u_2
inst✝⁵ : Field E
inst✝⁴ : Algebra F E
α : E
K : Type u
inst✝³ : Field K
inst✝² : Algebra F K
L : Type u_3
inst✝¹ : Field L
inst✝ : Algebra K L
x : L
hx : IsIntegral K x
⊢ (powerBasis hx).dim = (minpoly K x).natDegree
state_after: no goals
Theorem: TopologicalSpace.NoetherianSpace.isCompact
File: Mathlib/Topology/NoetherianSpace.lean

tactic: refine isCompact_iff_finite_subcover.2 fun U hUo hs => ?_
state_before: α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
⊢ IsCompact s
state_after: α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
ι✝ : Type u_1
U : ι✝ → Set α
hUo : ∀ (i : ι✝), IsOpen (U i)
hs : s ⊆ ⋃ i, U i
⊢ ∃ t, s ⊆ ⋃ i ∈ t, U i

tactic: rcases ((noetherianSpace_iff_opens α).mp ‹_› ⟨⋃ i, U i, isOpen_iUnion hUo⟩).elim_finite_subcover U
  hUo Set.Subset.rfl with ⟨t, ht⟩
state_before: α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
ι✝ : Type u_1
U : ι✝ → Set α
hUo : ∀ (i : ι✝), IsOpen (U i)
hs : s ⊆ ⋃ i, U i
⊢ ∃ t, s ⊆ ⋃ i ∈ t, U i
state_after: case intro
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
ι✝ : Type u_1
U : ι✝ → Set α
hUo : ∀ (i : ι✝), IsOpen (U i)
hs : s ⊆ ⋃ i, U i
t : Finset ι✝
ht : ↑{ carrier := ⋃ i, U i, is_open' := ⋯ } ⊆ ⋃ i ∈ t, U i
⊢ ∃ t, s ⊆ ⋃ i ∈ t, U i

tactic: exact ⟨t, hs.trans ht⟩
state_before: case intro
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : NoetherianSpace α
s : Set α
ι✝ : Type u_1
U : ι✝ → Set α
hUo : ∀ (i : ι✝), IsOpen (U i)
hs : s ⊆ ⋃ i, U i
t : Finset ι✝
ht : ↑{ carrier := ⋃ i, U i, is_open' := ⋯ } ⊆ ⋃ i ∈ t, U i
⊢ ∃ t, s ⊆ ⋃ i ∈ t, U i
state_after: no goals
Theorem: DistribMulActionHom.toLinearMap_injective
File: Mathlib/Algebra/Module/LinearMap/Defs.lean

tactic: ext m
state_before: R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
k : Type u_5
S : Type u_6
S₃ : Type u_7
T : Type u_8
M : Type u_9
M₁ : Type u_10
M₂ : Type u_11
M₃ : Type u_12
N₁ : Type u_13
N₂ : Type u_14
N₃ : Type u_15
ι : Type u_16
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : Semiring R
inst✝³ : Module R M
inst✝² : Semiring S
inst✝¹ : Module S M₂
inst✝ : Module R M₃
σ : R →+* S
f g : M →ₑ+[↑σ] M₂
h : ↑f = ↑g
⊢ f = g
state_after: case a
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
k : Type u_5
S : Type u_6
S₃ : Type u_7
T : Type u_8
M : Type u_9
M₁ : Type u_10
M₂ : Type u_11
M₃ : Type u_12
N₁ : Type u_13
N₂ : Type u_14
N₃ : Type u_15
ι : Type u_16
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : Semiring R
inst✝³ : Module R M
inst✝² : Semiring S
inst✝¹ : Module S M₂
inst✝ : Module R M₃
σ : R →+* S
f g : M →ₑ+[↑σ] M₂
h : ↑f = ↑g
m : M
⊢ f m = g m

tactic: exact LinearMap.congr_fun h m
state_before: case a
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
k : Type u_5
S : Type u_6
S₃ : Type u_7
T : Type u_8
M : Type u_9
M₁ : Type u_10
M₂ : Type u_11
M₃ : Type u_12
N₁ : Type u_13
N₂ : Type u_14
N₃ : Type u_15
ι : Type u_16
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : Semiring R
inst✝³ : Module R M
inst✝² : Semiring S
inst✝¹ : Module S M₂
inst✝ : Module R M₃
σ : R →+* S
f g : M →ₑ+[↑σ] M₂
h : ↑f = ↑g
m : M
⊢ f m = g m
state_after: no goals
Theorem: List.cons_prefix_iff
File: Mathlib/Data/List/Infix.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ a :: l₁ <+: b :: l₂ ↔ a = b ∧ l₁ <+: l₂
state_after: case mp
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ a :: l₁ <+: b :: l₂ → a = b ∧ l₁ <+: l₂

case mpr
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ a = b ∧ l₁ <+: l₂ → a :: l₁ <+: b :: l₂

tactic: rintro ⟨L, hL⟩
state_before: case mp
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ a :: l₁ <+: b :: l₂ → a = b ∧ l₁ <+: l₂
state_after: case mp.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
L : List α
hL : a :: l₁ ++ L = b :: l₂
⊢ a = b ∧ l₁ <+: l₂

tactic: simp only [cons_append] at hL
state_before: case mp.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
L : List α
hL : a :: l₁ ++ L = b :: l₂
⊢ a = b ∧ l₁ <+: l₂
state_after: case mp.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
L : List α
hL : a :: (l₁ ++ L) = b :: l₂
⊢ a = b ∧ l₁ <+: l₂

tactic: injection hL with hLLeft hLRight
state_before: case mp.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
L : List α
hL : a :: (l₁ ++ L) = b :: l₂
⊢ a = b ∧ l₁ <+: l₂
state_after: case mp.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
L : List α
hLLeft : a = b
hLRight : l₁ ++ L = l₂
⊢ a = b ∧ l₁ <+: l₂

tactic: exact ⟨hLLeft, ⟨L, hLRight⟩⟩
state_before: case mp.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
L : List α
hLLeft : a = b
hLRight : l₁ ++ L = l₂
⊢ a = b ∧ l₁ <+: l₂
state_after: no goals

tactic: rintro ⟨rfl, h⟩
state_before: case mpr
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ a = b ∧ l₁ <+: l₂ → a :: l₁ <+: b :: l₂
state_after: case mpr.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a : α
m n : ℕ
h : l₁ <+: l₂
⊢ a :: l₁ <+: a :: l₂

tactic: rwa [prefix_cons_inj]
state_before: case mpr.intro
α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a : α
m n : ℕ
h : l₁ <+: l₂
⊢ a :: l₁ <+: a :: l₂
state_after: no goals
Theorem: Matrix.neg_cons
File: Mathlib/Data/Fin/VecNotation.lean

tactic: ext i
state_before: α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
inst✝ : Neg α
x : α
v : Fin n → α
⊢ -vecCons x v = vecCons (-x) (-v)
state_after: case h
α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
inst✝ : Neg α
x : α
v : Fin n → α
i : Fin n.succ
⊢ (-vecCons x v) i = vecCons (-x) (-v) i

tactic: refine Fin.cases ?_ ?_ i <;> simp
state_before: case h
α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
inst✝ : Neg α
x : α
v : Fin n → α
i : Fin n.succ
⊢ (-vecCons x v) i = vecCons (-x) (-v) i
state_after: no goals
Theorem: ZMod.inv_coe_unit
File: Mathlib/Data/ZMod/Basic.lean

tactic: have := congr_arg ((↑) : ℕ → ZMod n) (val_coe_unit_coprime u)
state_before: n : ℕ
u : (ZMod n)ˣ
⊢ (↑u)⁻¹ = ↑u⁻¹
state_after: n : ℕ
u : (ZMod n)ˣ
this : ↑((↑u).val.gcd n) = ↑1
⊢ (↑u)⁻¹ = ↑u⁻¹

tactic: rw [← mul_inv_eq_gcd, Nat.cast_one] at this
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑((↑u).val.gcd n) = ↑1
⊢ (↑u)⁻¹ = ↑u⁻¹
state_after: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
⊢ (↑u)⁻¹ = ↑u⁻¹

tactic: let u' : (ZMod n)ˣ := ⟨u, (u : ZMod n)⁻¹, this, by rwa [mul_comm]⟩
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
⊢ (↑u)⁻¹ = ↑u⁻¹
state_after: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
⊢ (↑u)⁻¹ = ↑u⁻¹

tactic: have h : u = u' := by
  apply Units.ext
  rfl
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
⊢ (↑u)⁻¹ = ↑u⁻¹
state_after: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
h : u = u'
⊢ (↑u)⁻¹ = ↑u⁻¹

tactic: rw [h]
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
h : u = u'
⊢ (↑u)⁻¹ = ↑u⁻¹
state_after: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
h : u = u'
⊢ (↑u')⁻¹ = ↑u'⁻¹

tactic: rfl
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
h : u = u'
⊢ (↑u')⁻¹ = ↑u'⁻¹
state_after: no goals

tactic: rwa [mul_comm]
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
⊢ (↑u)⁻¹ * ↑u = 1
state_after: no goals

tactic: apply Units.ext
state_before: n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
⊢ u = u'
state_after: case a
n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
⊢ ↑u = ↑u'

tactic: rfl
state_before: case a
n : ℕ
u : (ZMod n)ˣ
this : ↑u * (↑u)⁻¹ = 1
u' : (ZMod n)ˣ := { val := ↑u, inv := (↑u)⁻¹, val_inv := this, inv_val := ⋯ }
⊢ ↑u = ↑u'
state_after: no goals
Theorem: sdiff_le_iff'
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sdiff_le_iff, sup_comm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a \ b ≤ c ↔ a ≤ c ⊔ b
state_after: no goals
Theorem: PowerSeries.coeff_zero_C
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [coeff_C, if_pos rfl]
state_before: R : Type u_1
inst✝ : Semiring R
a : R
⊢ (coeff R 0) ((C R) a) = a
state_after: no goals
Theorem: CategoryTheory.Functor.punit_ext'
File: Mathlib/CategoryTheory/PUnit.lean

tactic: simp only [eq_iff_true_of_subsingleton]
state_before: C : Type u
inst✝ : Category.{v, u} C
F G : C ⥤ Discrete PUnit.{w + 1}
X : C
⊢ F.obj X = G.obj X
state_after: no goals
Theorem: Primrec.option_bind
File: Mathlib/Computability/Primrec.lean

tactic: cases f a <;> rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
σ : Type u_5
inst✝⁴ : Primcodable α
inst✝³ : Primcodable β
inst✝² : Primcodable γ
inst✝¹ : Primcodable δ
inst✝ : Primcodable σ
f : α → Option β
g : α → β → Option σ
hf : Primrec f
hg : Primrec₂ g
a : α
⊢ Option.casesOn (f a) none (g a) = (f a).bind (g a)
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.addX_smul
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: simp only [addX, smul_fin3_ext]
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P Q : Fin 3 → R
u v : R
⊢ W'.addX (u • P) (v • Q) = ((u * v) ^ 2) ^ 2 * W'.addX P Q
state_after: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P Q : Fin 3 → R
u v : R
⊢ u ^ 2 * P x * (v ^ 2 * Q x) ^ 2 * (u * P z) ^ 2 - 2 * (u ^ 3 * P y) * (v ^ 3 * Q y) * (u * P z) * (v * Q z) +
                      (u ^ 2 * P x) ^ 2 * (v ^ 2 * Q x) * (v * Q z) ^ 2 -
                    W'.a₁ * (u ^ 2 * P x) * (v ^ 3 * Q y) * (u * P z) ^ 2 * (v * Q z) -
                  W'.a₁ * (u ^ 3 * P y) * (v ^ 2 * Q x) * (u * P z) * (v * Q z) ^ 2 +
                2 * W'.a₂ * (u ^ 2 * P x) * (v ^ 2 * Q x) * (u * P z) ^ 2 * (v * Q z) ^ 2 -
              W'.a₃ * (v ^ 3 * Q y) * (u * P z) ^ 4 * (v * Q z) -
            W'.a₃ * (u ^ 3 * P y) * (u * P z) * (v * Q z) ^ 4 +
          W'.a₄ * (v ^ 2 * Q x) * (u * P z) ^ 4 * (v * Q z) ^ 2 +
        W'.a₄ * (u ^ 2 * P x) * (u * P z) ^ 2 * (v * Q z) ^ 4 +
      2 * W'.a₆ * (u * P z) ^ 4 * (v * Q z) ^ 4 =
    ((u * v) ^ 2) ^ 2 *
      (P x * Q x ^ 2 * P z ^ 2 - 2 * P y * Q y * P z * Q z + P x ^ 2 * Q x * Q z ^ 2 -
                      W'.a₁ * P x * Q y * P z ^ 2 * Q z -
                    W'.a₁ * P y * Q x * P z * Q z ^ 2 +
                  2 * W'.a₂ * P x * Q x * P z ^ 2 * Q z ^ 2 -
                W'.a₃ * Q y * P z ^ 4 * Q z -
              W'.a₃ * P y * P z * Q z ^ 4 +
            W'.a₄ * Q x * P z ^ 4 * Q z ^ 2 +
          W'.a₄ * P x * P z ^ 2 * Q z ^ 4 +
        2 * W'.a₆ * P z ^ 4 * Q z ^ 4)

tactic: ring1
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P Q : Fin 3 → R
u v : R
⊢ u ^ 2 * P x * (v ^ 2 * Q x) ^ 2 * (u * P z) ^ 2 - 2 * (u ^ 3 * P y) * (v ^ 3 * Q y) * (u * P z) * (v * Q z) +
                      (u ^ 2 * P x) ^ 2 * (v ^ 2 * Q x) * (v * Q z) ^ 2 -
                    W'.a₁ * (u ^ 2 * P x) * (v ^ 3 * Q y) * (u * P z) ^ 2 * (v * Q z) -
                  W'.a₁ * (u ^ 3 * P y) * (v ^ 2 * Q x) * (u * P z) * (v * Q z) ^ 2 +
                2 * W'.a₂ * (u ^ 2 * P x) * (v ^ 2 * Q x) * (u * P z) ^ 2 * (v * Q z) ^ 2 -
              W'.a₃ * (v ^ 3 * Q y) * (u * P z) ^ 4 * (v * Q z) -
            W'.a₃ * (u ^ 3 * P y) * (u * P z) * (v * Q z) ^ 4 +
          W'.a₄ * (v ^ 2 * Q x) * (u * P z) ^ 4 * (v * Q z) ^ 2 +
        W'.a₄ * (u ^ 2 * P x) * (u * P z) ^ 2 * (v * Q z) ^ 4 +
      2 * W'.a₆ * (u * P z) ^ 4 * (v * Q z) ^ 4 =
    ((u * v) ^ 2) ^ 2 *
      (P x * Q x ^ 2 * P z ^ 2 - 2 * P y * Q y * P z * Q z + P x ^ 2 * Q x * Q z ^ 2 -
                      W'.a₁ * P x * Q y * P z ^ 2 * Q z -
                    W'.a₁ * P y * Q x * P z * Q z ^ 2 +
                  2 * W'.a₂ * P x * Q x * P z ^ 2 * Q z ^ 2 -
                W'.a₃ * Q y * P z ^ 4 * Q z -
              W'.a₃ * P y * P z * Q z ^ 4 +
            W'.a₄ * Q x * P z ^ 4 * Q z ^ 2 +
          W'.a₄ * P x * P z ^ 2 * Q z ^ 4 +
        2 * W'.a₆ * P z ^ 4 * Q z ^ 4)
state_after: no goals
Theorem: Finset.sigma_preimage_mk
File: Mathlib/Data/Finset/Preimage.lean

tactic: ext x
state_before: α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
⊢ (t.sigma fun a => s.preimage (Sigma.mk a) ⋯) = filter (fun a => a.fst ∈ t) s
state_after: case a
α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
x : (i : α) × β i
⊢ (x ∈ t.sigma fun a => s.preimage (Sigma.mk a) ⋯) ↔ x ∈ filter (fun a => a.fst ∈ t) s

tactic: simp [and_comm]
state_before: case a
α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
x : (i : α) × β i
⊢ (x ∈ t.sigma fun a => s.preimage (Sigma.mk a) ⋯) ↔ x ∈ filter (fun a => a.fst ∈ t) s
state_after: no goals