1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: NumberField.InfinitePlace.even_finrank_of_not_isUnramified
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

tactic: by_cases FiniteDimensional k K
state_before: k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
hw : ¬IsUnramified k w
⊢ Even (finrank k K)
state_after: case pos
k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
hw : ¬IsUnramified k w
h✝ : FiniteDimensional k K
⊢ Even (finrank k K)

case neg
k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
hw : ¬IsUnramified k w
h✝ : ¬FiniteDimensional k K
⊢ Even (finrank k K)

tactic: exact IsGalois.card_aut_eq_finrank k K ▸ even_card_aut_of_not_isUnramified hw
state_before: case pos
k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
hw : ¬IsUnramified k w
h✝ : FiniteDimensional k K
⊢ Even (finrank k K)
state_after: no goals

tactic: exact finrank_of_not_finite ‹_› ▸ even_zero
state_before: case neg
k : Type u_1
inst✝⁸ : Field k
K : Type u_2
inst✝⁷ : Field K
F : Type u_3
inst✝⁶ : Field F
inst✝⁵ : NumberField K
inst✝⁴ : Algebra k K
inst✝³ : Algebra k F
inst✝² : Algebra K F
inst✝¹ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
inst✝ : IsGalois k K
hw : ¬IsUnramified k w
h✝ : ¬FiniteDimensional k K
⊢ Even (finrank k K)
state_after: no goals
Theorem: iInf_inf
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [iInf_inf_eq, iInf_const]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝¹ : CompleteLattice α
f✝ g s t : ι → α
a✝ b : α
inst✝ : Nonempty ι
f : ι → α
a : α
⊢ (⨅ x, f x) ⊓ a = ⨅ x, f x ⊓ a
state_after: no goals
Theorem: List.rdropWhile_singleton
File: Mathlib/Data/List/DropRight.lean

tactic: rw [← nil_append [x], rdropWhile_concat, rdropWhile_nil]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rdropWhile p [x] = if p x = true then [] else [x]
state_after: no goals
Theorem: Filter.Tendsto.atBot_zsmul_neg_const
File: Mathlib/Order/Filter/Archimedean.lean

tactic: simpa using hf.atBot_zsmul_const (neg_pos.2 hr)
state_before: α : Type u_1
R : Type u_2
l : Filter α
f✝ : α → R
r : R
inst✝¹ : LinearOrderedAddCommGroup R
inst✝ : Archimedean R
f : α → ℤ
hr : r < 0
hf : Tendsto f l atBot
⊢ Tendsto (fun x => f x • r) l atTop
state_after: no goals
Theorem: MellinConvergent.cpow_smul
File: Mathlib/Analysis/MellinTransform.lean

tactic: refine integrableOn_congr_fun (fun t ht => ?_) measurableSet_Ioi
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℝ → E
s a : ℂ
⊢ MellinConvergent (fun t => ↑t ^ a • f t) s ↔ MellinConvergent f (s + a)
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℝ → E
s a : ℂ
t : ℝ
ht : t ∈ Ioi 0
⊢ ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t

tactic: simp_rw [← sub_add_eq_add_sub, cpow_add _ _ (ofReal_ne_zero.2 <| ne_of_gt ht), mul_smul]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℝ → E
s a : ℂ
t : ℝ
ht : t ∈ Ioi 0
⊢ ↑t ^ (s - 1) • (fun t => ↑t ^ a • f t) t = ↑t ^ (s + a - 1) • f t
state_after: no goals
Theorem: Representation.smul_tprod_one_asModule
File: Mathlib/RepresentationTheory/Basic.lean

tactic: show asAlgebraHom (ρV ⊗ 1) _ _ = asAlgebraHom ρV _ _ ⊗ₜ _
state_before: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ let x' := x;
  let z := x ⊗ₜ[k] y;
  r • z = (r • x') ⊗ₜ[k] y
state_after: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ ((ρV ⊗ 1).asAlgebraHom r) (x ⊗ₜ[k] y) = (ρV.asAlgebraHom r) x ⊗ₜ[k] y

tactic: simp only [asAlgebraHom_def, MonoidAlgebra.lift_apply, tprod_apply, MonoidHom.one_apply,
  LinearMap.finsupp_sum_apply, LinearMap.smul_apply, TensorProduct.map_tmul, LinearMap.one_apply]
state_before: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ ((ρV ⊗ 1).asAlgebraHom r) (x ⊗ₜ[k] y) = (ρV.asAlgebraHom r) x ⊗ₜ[k] y
state_after: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ (Finsupp.sum r fun i d => d • (ρV i) x ⊗ₜ[k] y) = (Finsupp.sum r fun i d => d • (ρV i) x) ⊗ₜ[k] y

tactic: simp only [Finsupp.sum, TensorProduct.sum_tmul]
state_before: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ (Finsupp.sum r fun i d => d • (ρV i) x ⊗ₜ[k] y) = (Finsupp.sum r fun i d => d • (ρV i) x) ⊗ₜ[k] y
state_after: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ ∑ x_1 ∈ r.support, r x_1 • (ρV x_1) x ⊗ₜ[k] y = ∑ a ∈ r.support, (r a • (ρV a) x) ⊗ₜ[k] y

tactic: rfl
state_before: k : Type u_1
G : Type u_2
V : Type u_3
W : Type u_4
inst✝⁵ : CommSemiring k
inst✝⁴ : Monoid G
inst✝³ : AddCommMonoid V
inst✝² : Module k V
inst✝¹ : AddCommMonoid W
inst✝ : Module k W
ρV : Representation k G V
ρW : Representation k G W
r : MonoidAlgebra k G
x : V
y : W
⊢ ∑ x_1 ∈ r.support, r x_1 • (ρV x_1) x ⊗ₜ[k] y = ∑ a ∈ r.support, (r a • (ρV a) x) ⊗ₜ[k] y
state_after: no goals
Theorem: TensorAlgebra.ι_eq_zero_iff
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

tactic: rw [← ι_inj R x 0, LinearMap.map_zero]
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : M
⊢ (ι R) x = 0 ↔ x = 0
state_after: no goals
Theorem: upperSemicontinuousAt_sum
File: Mathlib/Topology/Semicontinuous.lean

tactic: simp_rw [← upperSemicontinuousWithinAt_univ_iff] at *
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
β : Type u_2
inst✝⁴ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
ι : Type u_3
γ : Type u_4
inst✝³ : LinearOrderedAddCommMonoid γ
inst✝² : TopologicalSpace γ
inst✝¹ : OrderTopology γ
inst✝ : ContinuousAdd γ
f : ι → α → γ
a : Finset ι
ha : ∀ i ∈ a, UpperSemicontinuousAt (f i) x
⊢ UpperSemicontinuousAt (fun z => ∑ i ∈ a, f i z) x
state_after: α : Type u_1
inst✝⁵ : TopologicalSpace α
β : Type u_2
inst✝⁴ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
ι : Type u_3
γ : Type u_4
inst✝³ : LinearOrderedAddCommMonoid γ
inst✝² : TopologicalSpace γ
inst✝¹ : OrderTopology γ
inst✝ : ContinuousAdd γ
f : ι → α → γ
a : Finset ι
ha : ∀ i ∈ a, UpperSemicontinuousWithinAt (f i) univ x
⊢ UpperSemicontinuousWithinAt (fun z => ∑ i ∈ a, f i z) univ x

tactic: exact upperSemicontinuousWithinAt_sum ha
state_before: α : Type u_1
inst✝⁵ : TopologicalSpace α
β : Type u_2
inst✝⁴ : Preorder β
f✝ g : α → β
x : α
s t : Set α
y z : β
ι : Type u_3
γ : Type u_4
inst✝³ : LinearOrderedAddCommMonoid γ
inst✝² : TopologicalSpace γ
inst✝¹ : OrderTopology γ
inst✝ : ContinuousAdd γ
f : ι → α → γ
a : Finset ι
ha : ∀ i ∈ a, UpperSemicontinuousWithinAt (f i) univ x
⊢ UpperSemicontinuousWithinAt (fun z => ∑ i ∈ a, f i z) univ x
state_after: no goals
Theorem: RCLike.ofReal_nonneg
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [← ofReal_zero, ofReal_le_ofReal]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x : ℝ
⊢ 0 ≤ ↑x ↔ 0 ≤ x
state_after: no goals
Theorem: Behrend.card_box
File: Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean

tactic: simp [box]
state_before: α : Type u_1
β : Type u_2
n d k N : ℕ
x : Fin n → ℕ
⊢ (box n d).card = d ^ n
state_after: no goals
Theorem: vadd_right_mem_affineSpan_pair
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [vadd_mem_iff_mem_direction _ (right_mem_affineSpan_pair _ _ _), direction_affineSpan,
  mem_vectorSpan_pair]
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
p₁ p₂ : P
v : V
⊢ v +ᵥ p₂ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v
state_after: no goals
Theorem: CharP.char_ne_zero_of_finite
File: Mathlib/Algebra/CharP/Basic.lean

tactic: rintro rfl
state_before: R : Type u_1
inst✝² : NonAssocRing R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Finite R
⊢ p ≠ 0
state_after: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : Finite R
inst✝ : CharP R 0
⊢ False

tactic: haveI : CharZero R := charP_to_charZero R
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : Finite R
inst✝ : CharP R 0
⊢ False
state_after: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : Finite R
inst✝ : CharP R 0
this : CharZero R
⊢ False

tactic: cases nonempty_fintype R
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : Finite R
inst✝ : CharP R 0
this : CharZero R
⊢ False
state_after: case intro
R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : Finite R
inst✝ : CharP R 0
this : CharZero R
val✝ : Fintype R
⊢ False

tactic: exact absurd Nat.cast_injective (not_injective_infinite_finite ((↑) : ℕ → R))
state_before: case intro
R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : Finite R
inst✝ : CharP R 0
this : CharZero R
val✝ : Fintype R
⊢ False
state_after: no goals
Theorem: Convex.mem_toCone
File: Mathlib/Analysis/Convex/Cone/Basic.lean

tactic: simp only [toCone, ConvexCone.mem_mk, mem_iUnion, mem_smul_set, eq_comm, exists_prop]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝² : LinearOrderedField 𝕜
inst✝¹ : AddCommGroup E
inst✝ : Module 𝕜 E
s : Set E
hs : Convex 𝕜 s
x : E
⊢ x ∈ toCone s hs ↔ ∃ c, 0 < c ∧ ∃ y ∈ s, c • y = x
state_after: no goals
Theorem: FirstOrder.Language.relMap_quotient_mk'
File: Mathlib/ModelTheory/Quotients.lean

tactic: change
  Quotient.lift (@RelMap L M ps.toStructure n r) Prestructure.rel_equiv (Quotient.finChoice _) ↔
    _
state_before: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
r : L.Relations n
x : Fin n → M
⊢ (RelMap r fun i => ⟦x i⟧) ↔ RelMap r x
state_after: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
r : L.Relations n
x : Fin n → M
⊢ Quotient.lift (RelMap r) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) ↔ RelMap r x

tactic: rw [Quotient.finChoice_eq, Quotient.lift_mk]
state_before: L : Language
M : Type u_1
s : Setoid M
ps : L.Prestructure s
n : ℕ
r : L.Relations n
x : Fin n → M
⊢ Quotient.lift (RelMap r) ⋯ (Quotient.finChoice fun i => ⟦x i⟧) ↔ RelMap r x
state_after: no goals
Theorem: Nat.descFactorial_eq_zero_iff_lt
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: simp only [descFactorial_zero, Nat.one_ne_zero, Nat.not_lt_zero]
state_before: n : ℕ
⊢ n.descFactorial 0 = 0 ↔ n < 0
state_after: no goals

tactic: rw [descFactorial_succ, mul_eq_zero, descFactorial_eq_zero_iff_lt, Nat.lt_succ_iff,
  Nat.sub_eq_zero_iff_le, Nat.lt_iff_le_and_ne, or_iff_left_iff_imp, and_imp]
state_before: n k : ℕ
⊢ n.descFactorial k.succ = 0 ↔ n < k.succ
state_after: n k : ℕ
⊢ n ≤ k → n ≠ k → n ≤ k

tactic: exact fun h _ => h
state_before: n k : ℕ
⊢ n ≤ k → n ≠ k → n ≤ k
state_after: no goals
Theorem: Matrix.blockTriangular_reindex_iff
File: Mathlib/LinearAlgebra/Matrix/Block.lean

tactic: refine ⟨fun h => ?_, fun h => ?_⟩
state_before: α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
⊢ ((reindex e e) M).BlockTriangular b ↔ M.BlockTriangular (b ∘ ⇑e)
state_after: case refine_1
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : ((reindex e e) M).BlockTriangular b
⊢ M.BlockTriangular (b ∘ ⇑e)

case refine_2
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : M.BlockTriangular (b ∘ ⇑e)
⊢ ((reindex e e) M).BlockTriangular b

tactic: convert h.submatrix
state_before: case refine_1
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : ((reindex e e) M).BlockTriangular b
⊢ M.BlockTriangular (b ∘ ⇑e)
state_after: case h.e'_6
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : ((reindex e e) M).BlockTriangular b
⊢ M = ((reindex e e) M).submatrix ⇑e ⇑e

tactic: simp only [reindex_apply, submatrix_submatrix, submatrix_id_id, Equiv.symm_comp_self]
state_before: case h.e'_6
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : ((reindex e e) M).BlockTriangular b
⊢ M = ((reindex e e) M).submatrix ⇑e ⇑e
state_after: no goals

tactic: convert h.submatrix
state_before: case refine_2
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : M.BlockTriangular (b ∘ ⇑e)
⊢ ((reindex e e) M).BlockTriangular b
state_after: case h.e'_7
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : M.BlockTriangular (b ∘ ⇑e)
⊢ b = (b ∘ ⇑e) ∘ ⇑e.symm

tactic: simp only [comp.assoc b e e.symm, Equiv.self_comp_symm, comp_id]
state_before: case h.e'_7
α : Type u_1
β : Type u_2
m : Type u_3
n : Type u_4
o : Type u_5
m' : α → Type u_6
n' : α → Type u_7
R : Type v
inst✝¹ : CommRing R
M N : Matrix m m R
b✝ : m → α
inst✝ : LT α
b : n → α
e : m ≃ n
h : M.BlockTriangular (b ∘ ⇑e)
⊢ b = (b ∘ ⇑e) ∘ ⇑e.symm
state_after: no goals
Theorem: closure_iUnion_of_finite
File: Mathlib/Topology/Basic.lean

tactic: rw [← sUnion_range, (finite_range _).closure_sUnion, biUnion_range]
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝¹ : TopologicalSpace X
inst✝ : Finite ι
f : ι → Set X
⊢ closure (⋃ i, f i) = ⋃ i, closure (f i)
state_after: no goals
Theorem: List.Ico.succ_singleton
File: Mathlib/Data/List/Intervals.lean

tactic: dsimp [Ico]
state_before: n : ℕ
⊢ Ico n (n + 1) = [n]
state_after: n : ℕ
⊢ range' n (n + 1 - n) = [n]

tactic: simp [range', Nat.add_sub_cancel_left]
state_before: n : ℕ
⊢ range' n (n + 1 - n) = [n]
state_after: no goals
Theorem: star_lt_iff
File: Mathlib/Algebra/Star/Order.lean

tactic: rw [← star_lt_star_iff, star_star]
state_before: R : Type u
inst✝³ : NonUnitalSemiring R
inst✝² : PartialOrder R
inst✝¹ : StarRing R
inst✝ : StarOrderedRing R
x y : R
⊢ star x < y ↔ x < star y
state_after: no goals
Theorem: QuaternionGroup.orderOf_a_one
File: Mathlib/GroupTheory/SpecificGroups/Quaternion.lean

tactic: cases' eq_zero_or_neZero n with hn hn
state_before: n : ℕ
⊢ orderOf (a 1) = 2 * n
state_after: case inl
n : ℕ
hn : n = 0
⊢ orderOf (a 1) = 2 * n

case inr
n : ℕ
hn : NeZero n
⊢ orderOf (a 1) = 2 * n

tactic: apply (Nat.le_of_dvd
  (NeZero.pos _) (orderOf_dvd_of_pow_eq_one (@a_one_pow_n n))).lt_or_eq.resolve_left
state_before: case inr
n : ℕ
hn : NeZero n
⊢ orderOf (a 1) = 2 * n
state_after: case inr
n : ℕ
hn : NeZero n
⊢ ¬orderOf (a 1) < 2 * n

tactic: intro h
state_before: case inr
n : ℕ
hn : NeZero n
⊢ ¬orderOf (a 1) < 2 * n
state_after: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
⊢ False

tactic: have h1 : (a 1 : QuaternionGroup n) ^ orderOf (a 1) = 1 := pow_orderOf_eq_one _
state_before: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
⊢ False
state_after: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h1 : a 1 ^ orderOf (a 1) = 1
⊢ False

tactic: rw [a_one_pow] at h1
state_before: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h1 : a 1 ^ orderOf (a 1) = 1
⊢ False
state_after: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h1 : a ↑(orderOf (a 1)) = 1
⊢ False

tactic: injection h1 with h2
state_before: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h1 : a ↑(orderOf (a 1)) = 1
⊢ False
state_after: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h2 : ↑(orderOf (a 1)) = 0
⊢ False

tactic: rw [← ZMod.val_eq_zero, ZMod.val_natCast, Nat.mod_eq_of_lt h] at h2
state_before: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h2 : ↑(orderOf (a 1)) = 0
⊢ False
state_after: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h2 : orderOf (a 1) = 0
⊢ False

tactic: exact absurd h2.symm (orderOf_pos _).ne
state_before: case inr
n : ℕ
hn : NeZero n
h : orderOf (a 1) < 2 * n
h2 : orderOf (a 1) = 0
⊢ False
state_after: no goals

tactic: subst hn
state_before: case inl
n : ℕ
hn : n = 0
⊢ orderOf (a 1) = 2 * n
state_after: case inl

⊢ orderOf (a 1) = 2 * 0

tactic: simp_rw [mul_zero, orderOf_eq_zero_iff']
state_before: case inl

⊢ orderOf (a 1) = 2 * 0
state_after: case inl

⊢ ∀ (n : ℕ), 0 < n → QuaternionGroup.a 1 ^ n ≠ 1

tactic: intro n h
state_before: case inl

⊢ ∀ (n : ℕ), 0 < n → QuaternionGroup.a 1 ^ n ≠ 1
state_after: case inl
n : ℕ
h : 0 < n
⊢ a 1 ^ n ≠ 1

tactic: rw [one_def, a_one_pow]
state_before: case inl
n : ℕ
h : 0 < n
⊢ a 1 ^ n ≠ 1
state_after: case inl
n : ℕ
h : 0 < n
⊢ a ↑n ≠ a 0

tactic: apply mt a.inj
state_before: case inl
n : ℕ
h : 0 < n
⊢ a ↑n ≠ a 0
state_after: case inl
n : ℕ
h : 0 < n
⊢ ¬↑n = 0

tactic: haveI : CharZero (ZMod (2 * 0)) := ZMod.charZero
state_before: case inl
n : ℕ
h : 0 < n
⊢ ¬↑n = 0
state_after: case inl
n : ℕ
h : 0 < n
this : CharZero (ZMod (2 * 0))
⊢ ¬↑n = 0

tactic: simpa using h.ne'
state_before: case inl
n : ℕ
h : 0 < n
this : CharZero (ZMod (2 * 0))
⊢ ¬↑n = 0
state_after: no goals
Theorem: Real.is_glb_sInf
File: Mathlib/Data/Real/Archimedean.lean

tactic: rw [sInf_def, ← isLUB_neg', neg_neg]
state_before: S : Set ℝ
h₁ : S.Nonempty
h₂ : BddBelow S
⊢ IsGLB S (sInf S)
state_after: S : Set ℝ
h₁ : S.Nonempty
h₂ : BddBelow S
⊢ IsLUB (-S) (sSup (-S))

tactic: exact Real.isLUB_sSup _ h₁.neg h₂.neg
state_before: S : Set ℝ
h₁ : S.Nonempty
h₂ : BddBelow S
⊢ IsLUB (-S) (sSup (-S))
state_after: no goals
Theorem: Metric.ball_subset
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

tactic: rw [← add_sub_cancel ε₁ ε₂]
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z✝ : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : dist x y ≤ ε₂ - ε₁
z : α
zx : z ∈ ball x ε₁
⊢ z ∈ ball y ε₂
state_after: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z✝ : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : dist x y ≤ ε₂ - ε₁
z : α
zx : z ∈ ball x ε₁
⊢ z ∈ ball y (ε₁ + (ε₂ - ε₁))

tactic: exact lt_of_le_of_lt (dist_triangle z x y) (add_lt_add_of_lt_of_le zx h)
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z✝ : α
δ ε ε₁ ε₂ : ℝ
s : Set α
h : dist x y ≤ ε₂ - ε₁
z : α
zx : z ∈ ball x ε₁
⊢ z ∈ ball y (ε₁ + (ε₂ - ε₁))
state_after: no goals
Theorem: CategoryTheory.Limits.prod.comp_diag
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ X Y : C
inst✝ : HasBinaryProduct Y Y
f : X ⟶ Y
⊢ f ≫ diag Y = lift f f
state_after: no goals
Theorem: Real.Gamma_neg_nat_eq_zero
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

tactic: simpa only [← Complex.ofReal_natCast, ← Complex.ofReal_neg, Complex.Gamma_ofReal,
  Complex.ofReal_eq_zero] using Complex.Gamma_neg_nat_eq_zero n
state_before: n : ℕ
⊢ Gamma (-↑n) = 0
state_after: no goals
Theorem: eq_singleton_bot_of_sSup_eq_bot_of_nonempty
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [Set.eq_singleton_iff_nonempty_unique_mem]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : sSup s = ⊥
hne : s.Nonempty
⊢ s = {⊥}
state_after: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : sSup s = ⊥
hne : s.Nonempty
⊢ s.Nonempty ∧ ∀ x ∈ s, x = ⊥

tactic: rw [sSup_eq_bot] at h_sup
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : sSup s = ⊥
hne : s.Nonempty
⊢ s.Nonempty ∧ ∀ x ∈ s, x = ⊥
state_after: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : ∀ a ∈ s, a = ⊥
hne : s.Nonempty
⊢ s.Nonempty ∧ ∀ x ∈ s, x = ⊥

tactic: exact ⟨hne, h_sup⟩
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
s✝ t : Set α
a b : α
s : Set α
h_sup : ∀ a ∈ s, a = ⊥
hne : s.Nonempty
⊢ s.Nonempty ∧ ∀ x ∈ s, x = ⊥
state_after: no goals
Theorem: RCLike.intCast_im
File: Mathlib/Analysis/RCLike/Basic.lean

tactic: rw [← ofReal_intCast, ofReal_im]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z : K
n : ℤ
⊢ im ↑n = 0
state_after: no goals
Theorem: Filter.eventually_const
File: Mathlib/Order/Filter/Basic.lean

tactic: by_cases h : p <;> simp [h, t.ne]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
f : Filter α
t : f.NeBot
p : Prop
⊢ (∀ᶠ (x : α) in f, p) ↔ p
state_after: no goals