harrywsanders/mathlib_extracted huggingface dataset:
-- Mathlib/NumberTheory/NumberField/CanonicalEmbedding/ConvexBody.lean
theorem convexBodyLT'_neg_mem (x : mixedSpace K) (hx : x ∈ convexBodyLT' K f w₀) :
    -x ∈ convexBodyLT' K f w₀

Proof state:
case h.e'_2.h.h.a
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ : { w // w.IsComplex }
x : mixedSpace K
hx :
  (∀ (a : InfinitePlace K) (b : a.IsReal), |x.1 ⟨a, b⟩| < ↑(f a)) ∧
    ∀ (a : InfinitePlace K) (b : a.IsComplex),
      x.2 ⟨a, b⟩ ∈ if ⟨a, b⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a) ^ 2} else ball 0 ↑(f a)
a✝¹ : InfinitePlace K
a✝ : a✝¹.IsComplex
⊢ (-x.2 ⟨a✝¹, a✝⟩ ∈ if ⟨a✝¹, a✝⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a✝¹) ^ 2} else ball 0 ↑(f a✝¹)) ↔
    x.2 ⟨a✝¹, a✝⟩ ∈ if ⟨a✝¹, a✝⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a✝¹) ^ 2} else ball 0 ↑(f a✝¹)

Tactic:
split_ifs <;> simp

Result:
no goals

Proof state:
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ : { w // w.IsComplex }
x : mixedSpace K
hx :
  (∀ (a : InfinitePlace K) (b : a.IsReal), |x.1 ⟨a, b⟩| < ↑(f a)) ∧
    ∀ (a : InfinitePlace K) (b : a.IsComplex),
      x.2 ⟨a, b⟩ ∈ if ⟨a, b⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a) ^ 2} else ball 0 ↑(f a)
⊢ (∀ (a : InfinitePlace K) (b : a.IsReal), |x.1 ⟨a, b⟩| < ↑(f a)) ∧
    ∀ (a : InfinitePlace K) (b : a.IsComplex),
      -x.2 ⟨a, b⟩ ∈ if ⟨a, b⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a) ^ 2} else ball 0 ↑(f a)

Tactic:
convert hx using 3

Result:
case h.e'_2.h.h.a
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ : { w // w.IsComplex }
x : mixedSpace K
hx :
  (∀ (a : InfinitePlace K) (b : a.IsReal), |x.1 ⟨a, b⟩| < ↑(f a)) ∧
    ∀ (a : InfinitePlace K) (b : a.IsComplex),
      x.2 ⟨a, b⟩ ∈ if ⟨a, b⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a) ^ 2} else ball 0 ↑(f a)
a✝¹ : InfinitePlace K
a✝ : a✝¹.IsComplex
⊢ (-x.2 ⟨a✝¹, a✝⟩ ∈ if ⟨a✝¹, a✝⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a✝¹) ^ 2} else ball 0 ↑(f a✝¹)) ↔
    x.2 ⟨a✝¹, a✝⟩ ∈ if ⟨a✝¹, a✝⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a✝¹) ^ 2} else ball 0 ↑(f a✝¹)

Proof state:
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ : { w // w.IsComplex }
x : mixedSpace K
hx : x ∈ convexBodyLT' K f w₀
⊢ -x ∈ convexBodyLT' K f w₀

Tactic:
simp only [Set.mem_prod, Set.mem_pi, Set.mem_univ, mem_ball, dist_zero_right, Real.norm_eq_abs,
  true_implies, Subtype.forall, Prod.fst_neg, Pi.neg_apply, norm_neg, Prod.snd_neg] at hx ⊢

Result:
K : Type u_1
inst✝ : Field K
f : InfinitePlace K → ℝ≥0
w₀ : { w // w.IsComplex }
x : mixedSpace K
hx :
  (∀ (a : InfinitePlace K) (b : a.IsReal), |x.1 ⟨a, b⟩| < ↑(f a)) ∧
    ∀ (a : InfinitePlace K) (b : a.IsComplex),
      x.2 ⟨a, b⟩ ∈ if ⟨a, b⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a) ^ 2} else ball 0 ↑(f a)
⊢ (∀ (a : InfinitePlace K) (b : a.IsReal), |x.1 ⟨a, b⟩| < ↑(f a)) ∧
    ∀ (a : InfinitePlace K) (b : a.IsComplex),
      -x.2 ⟨a, b⟩ ∈ if ⟨a, b⟩ = w₀ then {x | |x.re| < 1 ∧ |x.im| < ↑(f a) ^ 2} else ball 0 ↑(f a)
-- Mathlib/Algebra/Algebra/Basic.lean
theorem End_algebraMap_isUnit_inv_apply_eq_iff' {x : R}
    (h : IsUnit (algebraMap R (Module.End S M) x)) (m m' : M) :
    m' = (↑h.unit⁻¹ : Module.End S M) m ↔ m = x • m' where
  mp H := H ▸ (End_isUnit_apply_inv_apply_of_isUnit h m).symm
  mpr H :=
    H.symm ▸ by
      apply_fun (↑h.unit : M → M) using ((Module.End_isUnit_iff _).mp h).injective
      simpa using End_isUnit_apply_inv_apply_of_isUnit h (x • m') |>.symm

Proof state:
R : Type u
S : Type v
M : Type w
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : SMulCommClass S R M
inst✝¹ : SMul R S
inst✝ : IsScalarTower R S M
x : R
h : IsUnit ((algebraMap R (End S M)) x)
m m' : M
H : m = x • m'
⊢ m' = ↑h.unit⁻¹ (x • m')

Tactic:
apply_fun (↑h.unit : M → M) using ((Module.End_isUnit_iff _).mp h).injective

Result:
R : Type u
S : Type v
M : Type w
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : SMulCommClass S R M
inst✝¹ : SMul R S
inst✝ : IsScalarTower R S M
x : R
h : IsUnit ((algebraMap R (End S M)) x)
m m' : M
H : m = x • m'
⊢ ↑h.unit m' = ↑h.unit (↑h.unit⁻¹ (x • m'))

Proof state:
R : Type u
S : Type v
M : Type w
inst✝⁷ : CommSemiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : Module S M
inst✝² : SMulCommClass S R M
inst✝¹ : SMul R S
inst✝ : IsScalarTower R S M
x : R
h : IsUnit ((algebraMap R (End S M)) x)
m m' : M
H : m = x • m'
⊢ ↑h.unit m' = ↑h.unit (↑h.unit⁻¹ (x • m'))

Tactic:
simpa using End_isUnit_apply_inv_apply_of_isUnit h (x • m') |>.symm

Result:
no goals
-- Mathlib/MeasureTheory/Measure/Haar/Basic.lean
theorem prehaar_mem_haarProduct (K₀ : PositiveCompacts G) {U : Set G} (hU : (interior U).Nonempty) :
    prehaar (K₀ : Set G) U ∈ haarProduct (K₀ : Set G)

Proof state:
case mk
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : IsTopologicalGroup G
K₀ : PositiveCompacts G
U : Set G
hU : (interior U).Nonempty
K : Set G
hK : IsCompact K
a✝ : { carrier := K, isCompact' := hK } ∈ univ
⊢ prehaar (↑K₀) U { carrier := K, isCompact' := hK } ∈
    (fun K => Icc 0 ↑(index ↑K ↑K₀)) { carrier := K, isCompact' := hK }

Tactic:
rw [mem_Icc]

Result:
case mk
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : IsTopologicalGroup G
K₀ : PositiveCompacts G
U : Set G
hU : (interior U).Nonempty
K : Set G
hK : IsCompact K
a✝ : { carrier := K, isCompact' := hK } ∈ univ
⊢ 0 ≤ prehaar (↑K₀) U { carrier := K, isCompact' := hK } ∧
    prehaar (↑K₀) U { carrier := K, isCompact' := hK } ≤ ↑(index ↑{ carrier := K, isCompact' := hK } ↑K₀)

Proof state:
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : IsTopologicalGroup G
K₀ : PositiveCompacts G
U : Set G
hU : (interior U).Nonempty
⊢ prehaar (↑K₀) U ∈ haarProduct ↑K₀

Tactic:
rintro ⟨K, hK⟩ _

Result:
case mk
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : IsTopologicalGroup G
K₀ : PositiveCompacts G
U : Set G
hU : (interior U).Nonempty
K : Set G
hK : IsCompact K
a✝ : { carrier := K, isCompact' := hK } ∈ univ
⊢ prehaar (↑K₀) U { carrier := K, isCompact' := hK } ∈
    (fun K => Icc 0 ↑(index ↑K ↑K₀)) { carrier := K, isCompact' := hK }

Proof state:
case mk
G : Type u_1
inst✝² : Group G
inst✝¹ : TopologicalSpace G
inst✝ : IsTopologicalGroup G
K₀ : PositiveCompacts G
U : Set G
hU : (interior U).Nonempty
K : Set G
hK : IsCompact K
a✝ : { carrier := K, isCompact' := hK } ∈ univ
⊢ 0 ≤ prehaar (↑K₀) U { carrier := K, isCompact' := hK } ∧
    prehaar (↑K₀) U { carrier := K, isCompact' := hK } ≤ ↑(index ↑{ carrier := K, isCompact' := hK } ↑K₀)

Tactic:
exact ⟨prehaar_nonneg K₀ _, prehaar_le_index K₀ _ hU⟩

Result:
no goals
-- Mathlib/.lake/packages/lean4/src/lean/Init/Data/Array/Lex/Lemmas.lean
theorem le_iff_exists [DecidableEq α] [LT α] [DecidableLT α]
    [Std.Irrefl (· < · : α → α → Prop)]
    [Std.Asymm (· < · : α → α → Prop)]
    [Std.Antisymm (¬ · < · : α → α → Prop)] {l₁ l₂ : Array α} :
    l₁ ≤ l₂ ↔
      (l₁ = l₂.take l₁.size) ∨
        (∃ (i : Nat) (h₁ : i < l₁.size) (h₂ : i < l₂.size),
          (∀ j, (hj : j < i) →
            l₁[j]'(Nat.lt_trans hj h₁) = l₂[j]'(Nat.lt_trans hj h₂)) ∧ l₁[i] < l₂[i])

Proof state:
case mk
α : Type u_1
inst✝⁵ : DecidableEq α
inst✝⁴ : LT α
inst✝³ : DecidableLT α
inst✝² : Std.Irrefl fun x1 x2 => x1 < x2
inst✝¹ : Std.Asymm fun x1 x2 => x1 < x2
inst✝ : Std.Antisymm fun x1 x2 => ¬x1 < x2
l₂ : Array α
toList✝ : List α
⊢ { toList := toList✝ } ≤ l₂ ↔
    { toList := toList✝ } = l₂.take { toList := toList✝ }.size ∨
      ∃ i h₁ h₂, (∀ (j : Nat) (hj : j < i), { toList := toList✝ }[j] = l₂[j]) ∧ { toList := toList✝ }[i] < l₂[i]

Tactic:
cases l₂

Result:
case mk.mk
α : Type u_1
inst✝⁵ : DecidableEq α
inst✝⁴ : LT α
inst✝³ : DecidableLT α
inst✝² : Std.Irrefl fun x1 x2 => x1 < x2
inst✝¹ : Std.Asymm fun x1 x2 => x1 < x2
inst✝ : Std.Antisymm fun x1 x2 => ¬x1 < x2
toList✝¹ toList✝ : List α
⊢ { toList := toList✝¹ } ≤ { toList := toList✝ } ↔
    { toList := toList✝¹ } = { toList := toList✝ }.take { toList := toList✝¹ }.size ∨
      ∃ i h₁ h₂,
        (∀ (j : Nat) (hj : j < i), { toList := toList✝¹ }[j] = { toList := toList✝ }[j]) ∧
          { toList := toList✝¹ }[i] < { toList := toList✝ }[i]

Proof state:
α : Type u_1
inst✝⁵ : DecidableEq α
inst✝⁴ : LT α
inst✝³ : DecidableLT α
inst✝² : Std.Irrefl fun x1 x2 => x1 < x2
inst✝¹ : Std.Asymm fun x1 x2 => x1 < x2
inst✝ : Std.Antisymm fun x1 x2 => ¬x1 < x2
l₁ l₂ : Array α
⊢ l₁ ≤ l₂ ↔ l₁ = l₂.take l₁.size ∨ ∃ i h₁ h₂, (∀ (j : Nat) (hj : j < i), l₁[j] = l₂[j]) ∧ l₁[i] < l₂[i]

Tactic:
cases l₁

Result:
case mk
α : Type u_1
inst✝⁵ : DecidableEq α
inst✝⁴ : LT α
inst✝³ : DecidableLT α
inst✝² : Std.Irrefl fun x1 x2 => x1 < x2
inst✝¹ : Std.Asymm fun x1 x2 => x1 < x2
inst✝ : Std.Antisymm fun x1 x2 => ¬x1 < x2
l₂ : Array α
toList✝ : List α
⊢ { toList := toList✝ } ≤ l₂ ↔
    { toList := toList✝ } = l₂.take { toList := toList✝ }.size ∨
      ∃ i h₁ h₂, (∀ (j : Nat) (hj : j < i), { toList := toList✝ }[j] = l₂[j]) ∧ { toList := toList✝ }[i] < l₂[i]

Proof state:
case mk.mk
α : Type u_1
inst✝⁵ : DecidableEq α
inst✝⁴ : LT α
inst✝³ : DecidableLT α
inst✝² : Std.Irrefl fun x1 x2 => x1 < x2
inst✝¹ : Std.Asymm fun x1 x2 => x1 < x2
inst✝ : Std.Antisymm fun x1 x2 => ¬x1 < x2
toList✝¹ toList✝ : List α
⊢ { toList := toList✝¹ } ≤ { toList := toList✝ } ↔
    { toList := toList✝¹ } = { toList := toList✝ }.take { toList := toList✝¹ }.size ∨
      ∃ i h₁ h₂,
        (∀ (j : Nat) (hj : j < i), { toList := toList✝¹ }[j] = { toList := toList✝ }[j]) ∧
          { toList := toList✝¹ }[i] < { toList := toList✝ }[i]

Tactic:
simp [List.le_iff_exists]

Result:
no goals
-- Mathlib/Topology/Algebra/UniformGroup/Defs.lean
theorem UniformContinuous.mul [UniformSpace β] {f : β → α} {g : β → α} (hf : UniformContinuous f)
    (hg : UniformContinuous g) : UniformContinuous fun x => f x * g x

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f g : β → α
hf : UniformContinuous f
hg : UniformContinuous g
⊢ UniformContinuous fun x => f x * g x

Tactic:
have : UniformContinuous fun x => f x / (g x)⁻¹ := hf.div hg.inv

Result:
α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f g : β → α
hf : UniformContinuous f
hg : UniformContinuous g
this : UniformContinuous fun x => f x / (g x)⁻¹
⊢ UniformContinuous fun x => f x * g x

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f g : β → α
hf : UniformContinuous f
hg : UniformContinuous g
this : UniformContinuous fun x => f x / (g x)⁻¹
⊢ UniformContinuous fun x => f x * g x

Tactic:
simp_all

Result:
no goals
-- Mathlib/Topology/DerivedSet.lean
@[simp]
lemma isClosed_derivedSet [T1Space X] (A : Set X) : IsClosed (derivedSet A)

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
A : Set X
⊢ derivedSet (derivedSet (closure A)) ⊆ derivedSet (closure A)

Tactic:
apply derivedSet_mono

Result:
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
A : Set X
⊢ derivedSet (closure A) ⊆ closure A

Proof state:
case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
A : Set X
⊢ derivedSet (closure A) ⊆ closure A

Tactic:
simp [← isClosed_iff_derivedSet_subset]

Result:
no goals

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
A : Set X
⊢ IsClosed (derivedSet A)

Tactic:
rw [← derivedSet_closure, isClosed_iff_derivedSet_subset]

Result:
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
A : Set X
⊢ derivedSet (derivedSet (closure A)) ⊆ derivedSet (closure A)
-- Mathlib/Tactic/NormNum/NatSqrt.lean
lemma nat_sqrt_helper {x y r : ℕ} (hr : y * y + r = x) (hle : Nat.ble r (2 * y)) :
    Nat.sqrt x = y

Proof state:
x y r : ℕ
hr : y * y + r = x
hle : r.ble (2 * y) = true
⊢ (y ^ 2 + r).sqrt = y

Tactic:
rw [two_mul] at hle

Result:
x y r : ℕ
hr : y * y + r = x
hle : r.ble (y + y) = true
⊢ (y ^ 2 + r).sqrt = y

Proof state:
x y r : ℕ
hr : y * y + r = x
hle : r.ble (y + y) = true
⊢ (y ^ 2 + r).sqrt = y

Tactic:
exact Nat.sqrt_add_eq' _ (Nat.le_of_ble_eq_true hle)

Result:
no goals

Proof state:
x y r : ℕ
hr : y * y + r = x
hle : r.ble (2 * y) = true
⊢ x.sqrt = y

Tactic:
rw [← hr, ← pow_two]

Result:
x y r : ℕ
hr : y * y + r = x
hle : r.ble (2 * y) = true
⊢ (y ^ 2 + r).sqrt = y
-- Mathlib/RingTheory/Nilpotent/Basic.lean
lemma IsNilpotent.smul [MonoidWithZero R] [MonoidWithZero S] [MulActionWithZero R S]
    [SMulCommClass R S S] [IsScalarTower R S S] {a : S} (ha : IsNilpotent a) (t : R) :
    IsNilpotent (t • a)

Proof state:
case intro
R : Type u_1
S : Type u_2
inst✝⁴ : MonoidWithZero R
inst✝³ : MonoidWithZero S
inst✝² : MulActionWithZero R S
inst✝¹ : SMulCommClass R S S
inst✝ : IsScalarTower R S S
a : S
t : R
k : ℕ
ha : a ^ k = 0
⊢ IsNilpotent (t • a)

Tactic:
use k

Result:
case h
R : Type u_1
S : Type u_2
inst✝⁴ : MonoidWithZero R
inst✝³ : MonoidWithZero S
inst✝² : MulActionWithZero R S
inst✝¹ : SMulCommClass R S S
inst✝ : IsScalarTower R S S
a : S
t : R
k : ℕ
ha : a ^ k = 0
⊢ (t • a) ^ k = 0

Proof state:
case h
R : Type u_1
S : Type u_2
inst✝⁴ : MonoidWithZero R
inst✝³ : MonoidWithZero S
inst✝² : MulActionWithZero R S
inst✝¹ : SMulCommClass R S S
inst✝ : IsScalarTower R S S
a : S
t : R
k : ℕ
ha : a ^ k = 0
⊢ (t • a) ^ k = 0

Tactic:
rw [smul_pow, ha, smul_zero]

Result:
no goals

Proof state:
R : Type u_1
S : Type u_2
inst✝⁴ : MonoidWithZero R
inst✝³ : MonoidWithZero S
inst✝² : MulActionWithZero R S
inst✝¹ : SMulCommClass R S S
inst✝ : IsScalarTower R S S
a : S
ha : IsNilpotent a
t : R
⊢ IsNilpotent (t • a)

Tactic:
obtain ⟨k, ha⟩ := ha

Result:
case intro
R : Type u_1
S : Type u_2
inst✝⁴ : MonoidWithZero R
inst✝³ : MonoidWithZero S
inst✝² : MulActionWithZero R S
inst✝¹ : SMulCommClass R S S
inst✝ : IsScalarTower R S S
a : S
t : R
k : ℕ
ha : a ^ k = 0
⊢ IsNilpotent (t • a)
-- Mathlib/CategoryTheory/Generator/Preadditive.lean
theorem isSeparator_iff_faithful_preadditiveCoyonedaObj (G : C) :
    IsSeparator G ↔ (preadditiveCoyonedaObj G).Faithful

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
G : C
⊢ (preadditiveCoyonedaObj (unop (op G)) ⋙ forget₂ (ModuleCat (End (unop (op G)))ᵐᵒᵖ) AddCommGrp).Faithful ↔
    (preadditiveCoyonedaObj G).Faithful

Tactic:
exact ⟨fun h => Functor.Faithful.of_comp _ (forget₂ _ AddCommGrp.{v}),
  fun h => Functor.Faithful.comp _ _⟩

Result:
no goals

Proof state:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
G : C
⊢ IsSeparator G ↔ (preadditiveCoyonedaObj G).Faithful

Tactic:
rw [isSeparator_iff_faithful_preadditiveCoyoneda, preadditiveCoyoneda_obj]

Result:
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Preadditive C
G : C
⊢ (preadditiveCoyonedaObj (unop (op G)) ⋙ forget₂ (ModuleCat (End (unop (op G)))ᵐᵒᵖ) AddCommGrp).Faithful ↔
    (preadditiveCoyonedaObj G).Faithful
-- Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean
theorem cos_eq_one_iff_of_lt_of_lt {x : ℝ} (hx₁ : -(2 * π) < x) (hx₂ : x < 2 * π) :
    cos x = 1 ↔ x = 0 :=
  ⟨fun h => by
    rcases (cos_eq_one_iff _).1 h with ⟨n, rfl⟩
    rw [mul_lt_iff_lt_one_left two_pi_pos] at hx₂
    rw [neg_lt, neg_mul_eq_neg_mul, mul_lt_iff_lt_one_left two_pi_pos] at hx₁
    norm_cast at hx₁ hx₂
    obtain rfl : n = 0 := le_antisymm (by omega) (by omega)
    simp, fun h => by simp [h]⟩

Proof state:
n : ℤ
h : cos (↑n * (2 * π)) = 1
hx₁ : -n < 1
hx₂ : n < 1
⊢ n ≤ 0

Tactic:
omega

Result:
no goals

Proof state:
x : ℝ
hx₁ : -(2 * π) < x
hx₂ : x < 2 * π
h : x = 0
⊢ cos x = 1

Tactic:
simp [h]

Result:
no goals

Proof state:
case intro
n : ℤ
h : cos (↑n * (2 * π)) = 1
hx₁ : -n < 1
hx₂ : n < 1
⊢ ↑n * (2 * π) = 0

Tactic:
obtain rfl : n = 0 := le_antisymm (by omega) (by omega)

Result:
case intro
h : cos (↑0 * (2 * π)) = 1
hx₁ : -0 < 1
hx₂ : 0 < 1
⊢ ↑0 * (2 * π) = 0

Proof state:
case intro
n : ℤ
hx₁ : -(2 * π) < ↑n * (2 * π)
hx₂ : ↑n < 1
h : cos (↑n * (2 * π)) = 1
⊢ ↑n * (2 * π) = 0

Tactic:
rw [neg_lt, neg_mul_eq_neg_mul, mul_lt_iff_lt_one_left two_pi_pos] at hx₁

Result:
case intro
n : ℤ
hx₁ : -↑n < 1
hx₂ : ↑n < 1
h : cos (↑n * (2 * π)) = 1
⊢ ↑n * (2 * π) = 0

Proof state:
n : ℤ
h : cos (↑n * (2 * π)) = 1
hx₁ : -n < 1
hx₂ : n < 1
⊢ 0 ≤ n

Tactic:
omega

Result:
no goals

Proof state:
x : ℝ
hx₁ : -(2 * π) < x
hx₂ : x < 2 * π
h : cos x = 1
⊢ x = 0

Tactic:
rcases (cos_eq_one_iff _).1 h with ⟨n, rfl⟩

Result:
case intro
n : ℤ
hx₁ : -(2 * π) < ↑n * (2 * π)
hx₂ : ↑n * (2 * π) < 2 * π
h : cos (↑n * (2 * π)) = 1
⊢ ↑n * (2 * π) = 0

Proof state:
case intro
n : ℤ
hx₁ : -(2 * π) < ↑n * (2 * π)
hx₂ : ↑n * (2 * π) < 2 * π
h : cos (↑n * (2 * π)) = 1
⊢ ↑n * (2 * π) = 0

Tactic:
rw [mul_lt_iff_lt_one_left two_pi_pos] at hx₂

Result:
case intro
n : ℤ
hx₁ : -(2 * π) < ↑n * (2 * π)
hx₂ : ↑n < 1
h : cos (↑n * (2 * π)) = 1
⊢ ↑n * (2 * π) = 0

Proof state:
case intro
n : ℤ
hx₁ : -↑n < 1
hx₂ : ↑n < 1
h : cos (↑n * (2 * π)) = 1
⊢ ↑n * (2 * π) = 0

Tactic:
norm_cast at hx₁ hx₂

Result:
case intro
n : ℤ
h : cos (↑n * (2 * π)) = 1
hx₁ : -n < 1
hx₂ : n < 1
⊢ ↑n * (2 * π) = 0

Proof state:
case intro
h : cos (↑0 * (2 * π)) = 1
hx₁ : -0 < 1
hx₂ : 0 < 1
⊢ ↑0 * (2 * π) = 0

Tactic:
simp

Result:
no goals
-- Mathlib/Data/ENNReal/Basic.lean
theorem abs_toReal {x : ℝ≥0∞} : |x.toReal| = x.toReal

Proof state:
x : ℝ≥0∞
⊢ |x.toReal| = x.toReal

Tactic:
cases x <;> simp

Result:
no goals
-- Mathlib/Data/DFinsupp/Defs.lean
theorem mapRange_comp (f : ∀ i, β₁ i → β₂ i) (f₂ : ∀ i, β i → β₁ i) (hf : ∀ i, f i 0 = 0)
    (hf₂ : ∀ i, f₂ i 0 = 0) (h : ∀ i, (f i ∘ f₂ i) 0 = 0) (g : Π₀ i : ι, β i) :
    mapRange (fun i => f i ∘ f₂ i) h g = mapRange f hf (mapRange f₂ hf₂ g)

Proof state:
case h
ι : Type u
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
f₂ : (i : ι) → β i → β₁ i
hf : ∀ (i : ι), f i 0 = 0
hf₂ : ∀ (i : ι), f₂ i 0 = 0
h : ∀ (i : ι), (f i ∘ f₂ i) 0 = 0
g : Π₀ (i : ι), β i
i✝ : ι
⊢ (mapRange (fun i => f i ∘ f₂ i) h g) i✝ = (mapRange f hf (mapRange f₂ hf₂ g)) i✝

Tactic:
simp only [mapRange_apply]

Result:
case h
ι : Type u
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
f₂ : (i : ι) → β i → β₁ i
hf : ∀ (i : ι), f i 0 = 0
hf₂ : ∀ (i : ι), f₂ i 0 = 0
h : ∀ (i : ι), (f i ∘ f₂ i) 0 = 0
g : Π₀ (i : ι), β i
i✝ : ι
⊢ (f i✝ ∘ f₂ i✝) (g i✝) = f i✝ (f₂ i✝ (g i✝))

Proof state:
ι : Type u
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
f₂ : (i : ι) → β i → β₁ i
hf : ∀ (i : ι), f i 0 = 0
hf₂ : ∀ (i : ι), f₂ i 0 = 0
h : ∀ (i : ι), (f i ∘ f₂ i) 0 = 0
g : Π₀ (i : ι), β i
⊢ mapRange (fun i => f i ∘ f₂ i) h g = mapRange f hf (mapRange f₂ hf₂ g)

Tactic:
ext

Result:
case h
ι : Type u
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
f₂ : (i : ι) → β i → β₁ i
hf : ∀ (i : ι), f i 0 = 0
hf₂ : ∀ (i : ι), f₂ i 0 = 0
h : ∀ (i : ι), (f i ∘ f₂ i) 0 = 0
g : Π₀ (i : ι), β i
i✝ : ι
⊢ (mapRange (fun i => f i ∘ f₂ i) h g) i✝ = (mapRange f hf (mapRange f₂ hf₂ g)) i✝

Proof state:
case h
ι : Type u
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝² : (i : ι) → Zero (β i)
inst✝¹ : (i : ι) → Zero (β₁ i)
inst✝ : (i : ι) → Zero (β₂ i)
f : (i : ι) → β₁ i → β₂ i
f₂ : (i : ι) → β i → β₁ i
hf : ∀ (i : ι), f i 0 = 0
hf₂ : ∀ (i : ι), f₂ i 0 = 0
h : ∀ (i : ι), (f i ∘ f₂ i) 0 = 0
g : Π₀ (i : ι), β i
i✝ : ι
⊢ (f i✝ ∘ f₂ i✝) (g i✝) = f i✝ (f₂ i✝ (g i✝))

Tactic:
rfl

Result:
no goals
-- Mathlib/RingTheory/Localization/Defs.lean
theorem sub_mk (a c) (b d) : (mk a b : Localization M) - mk c d =
    mk ((d : R) * a - b * c) (b * d)

Proof state:
R : Type u_1
inst✝ : CommRing R
M : Submonoid R
a c : R
b d : ↥M
⊢ mk a b - mk c d = mk (↑d * a - ↑b * c) (b * d)

Tactic:
rw [sub_eq_add_neg, neg_mk, add_mk, add_comm, mul_neg, ← sub_eq_add_neg]

Result:
no goals
-- Mathlib/RingTheory/Artinian/Module.lean
theorem IsArtinian.finite_of_linearIndependent [Nontrivial R] [h : IsArtinian R M] {s : Set M}
    (hs : LinearIndependent R ((↑) : s → M)) : s.Finite

Proof state:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
⊢ ∀ (n : ℕ), Subtype.val ∘ ⇑f '' {m | n ≤ m} ⊆ s

Tactic:
rintro n x ⟨y, _, rfl⟩

Result:
case intro.intro
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
n y : ℕ
left✝ : y ∈ {m | n ≤ m}
⊢ (Subtype.val ∘ ⇑f) y ∈ s

Proof state:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
⊢ (fun x1 x2 => x1 > x2) ↪r fun x1 x2 => x1 < x2

Tactic:
have f : ℕ ↪ s := Set.Infinite.natEmbedding s hf

Result:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
⊢ (fun x1 x2 => x1 > x2) ↪r fun x1 x2 => x1 < x2

Proof state:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
this : ∀ (n : ℕ), Subtype.val ∘ ⇑f '' {m | n ≤ m} ⊆ s
a b : ℕ
⊢ a ≤ b ↔ ∀ x ∈ {m | b ≤ m}, x ∈ {m | a ≤ m}

Tactic:
simp only [Set.mem_setOf_eq]

Result:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
this : ∀ (n : ℕ), Subtype.val ∘ ⇑f '' {m | n ≤ m} ⊆ s
a b : ℕ
⊢ a ≤ b ↔ ∀ (x : ℕ), b ≤ x → a ≤ x

Proof state:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
this✝ : ∀ (n : ℕ), Subtype.val ∘ ⇑f '' {m | n ≤ m} ⊆ s
this : ∀ (a b : ℕ), a ≤ b ↔ span R (Subtype.val ∘ ⇑f '' {m | b ≤ m}) ≤ span R (Subtype.val ∘ ⇑f '' {m | a ≤ m})
a b : ℕ
⊢ { toFun := fun n => span R (Subtype.val ∘ ⇑f '' {m | n ≤ m}), inj' := ⋯ } a <
      { toFun := fun n => span R (Subtype.val ∘ ⇑f '' {m | n ≤ m}), inj' := ⋯ } b ↔
    span R (Subtype.val ∘ ⇑f '' {m | a ≤ m}) < span R (Subtype.val ∘ ⇑f '' {m | b ≤ m})

Tactic:
rfl

Result:
no goals

Proof state:
R : Type u_1
M : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Nontrivial R
h : IsArtinian R M
s : Set M
hs : LinearIndependent R Subtype.val
hf : ¬s.Finite
f : ℕ ↪ ↑s
this✝ : ∀ (n : ℕ), Subtype.val ∘ ⇑f '' {m | n ≤ m} ⊆ s
this : ∀ (a b : ℕ), a ≤ b ↔ span R (Subtype.val ∘ ⇑f '' {m | b ≤ m}) ≤ span R (Subtype.val ∘ ⇑f '' {m | a ≤ m})
x y : ℕ
⊢ y ≤ x ∧ x ≤ y → x = y

Tactic:
exact fun ⟨h₁, h₂⟩ ↦ le_antisymm_iff.2 ⟨h₂, h₁⟩

Result:
no goals