tasksource/leandojo huggingface dataset:
Theorem: eventually_residual_liouville
File: Mathlib/NumberTheory/Liouville/Residual.lean

tactic: rw [Filter.Eventually, setOf_liouville_eq_irrational_inter_iInter_iUnion]
state_before: ⊢ ∀ᶠ (x : ℝ) in residual ℝ, Liouville x

tactic: refine eventually_residual_irrational.and ?_
state_before: ⊢ ({x | Irrational x} ∩ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)) ∈ residual ℝ

tactic: refine eventually_residual.2 ⟨_, ?_, Rat.denseEmbedding_coe_real.dense.mono ?_, Subset.rfl⟩
state_before: ⊢ ∀ᶠ (x : ℝ) in residual ℝ, x ∈ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)

tactic: exact isGδ_iInter fun n => IsOpen.isGδ <|
      isOpen_iUnion fun a => isOpen_iUnion fun b => isOpen_iUnion fun _hb => isOpen_ball
state_before: case refine_1

⊢ IsGδ (⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n))

tactic: rintro _ ⟨r, rfl⟩
state_before: case refine_2

⊢ range Rat.cast ⊆ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)

tactic: simp only [mem_iInter, mem_iUnion]
state_before: case refine_2.intro
r : ℚ
⊢ ↑r ∈ ⋂ (n : ℕ), ⋃ (a : ℤ) (b : ℤ) (_ : 1 < b), ball (↑a / ↑b) (1 / ↑b ^ n)

tactic: refine fun n => ⟨r.num * 2, r.den * 2, ?_, ?_⟩
state_before: case refine_2.intro
r : ℚ
⊢ ∀ (i : ℕ), ∃ i_1 i_2 i_3, ↑r ∈ ball (↑i_1 / ↑i_2) (1 / ↑i_2 ^ i)

tactic: have := Int.ofNat_le.2 r.pos
state_before: case refine_2.intro.refine_1
r : ℚ
n : ℕ
⊢ 1 < ↑r.den * 2

tactic: rw [Int.ofNat_one] at this
state_before: case refine_2.intro.refine_1
r : ℚ
n : ℕ
this : ↑(Nat.succ 0) ≤ ↑r.den
⊢ 1 < ↑r.den * 2

tactic: linarith
state_before: case refine_2.intro.refine_1
r : ℚ
n : ℕ
this : 1 ≤ ↑r.den
⊢ 1 < ↑r.den * 2

tactic: convert @mem_ball_self ℝ _ (r : ℝ) _ _
state_before: case refine_2.intro.refine_2
r : ℚ
n : ℕ
⊢ ↑r ∈ ball (↑(r.num * 2) / ↑(↑r.den * 2)) (1 / ↑(↑r.den * 2) ^ n)

tactic: push_cast
state_before: case h.e'_5.h.e'_3
r : ℚ
n : ℕ
⊢ ↑(r.num * 2) / ↑(↑r.den * 2) = ↑r

tactic: norm_cast
state_before: case h.e'_5.h.e'_3
r : ℚ
n : ℕ
⊢ ↑r.num * 2 / (↑r.den * 2) = ↑r

tactic: simp [Rat.divInt_mul_right (two_ne_zero), Rat.mkRat_self]
state_before: case h.e'_5.h.e'_3
r : ℚ
n : ℕ
⊢ Rat.divInt (r.num * 2) ↑(r.den * 2) = r

tactic: refine' one_div_pos.2 (pow_pos (Int.cast_pos.2 _) _)
state_before: case refine_2.intro.refine_2.convert_2
r : ℚ
n : ℕ
⊢ 0 < 1 / ↑(↑r.den * 2) ^ n

tactic: exact mul_pos (Int.coe_nat_pos.2 r.pos) zero_lt_two
state_before: case refine_2.intro.refine_2.convert_2
r : ℚ
n : ℕ
⊢ 0 < ↑r.den * 2
Theorem: Finset.sup_inf_distrib_left
File: Mathlib/Data/Finset/Lattice.lean

tactic: induction' s using Finset.cons_induction with i s hi h
state_before: F : Type ?u.138129
α : Type u_2
β : Type ?u.138135
γ : Type ?u.138138
ι : Type u_1
κ : Type ?u.138144
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
t : Finset κ
f✝ : ι → α
g : κ → α
a✝ : α
s : Finset ι
f : ι → α
a : α
⊢ a ⊓ sup s f = sup s fun i => a ⊓ f i

tactic: simp_rw [Finset.sup_empty, inf_bot_eq]
state_before: case empty
F : Type ?u.138129
α : Type u_2
β : Type ?u.138135
γ : Type ?u.138138
ι : Type u_1
κ : Type ?u.138144
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s : Finset ι
t : Finset κ
f✝ : ι → α
g : κ → α
a✝ : α
f : ι → α
a : α
⊢ a ⊓ sup ∅ f = sup ∅ fun i => a ⊓ f i

tactic: rw [sup_cons, sup_cons, inf_sup_left, h]
state_before: case cons
F : Type ?u.138129
α : Type u_2
β : Type ?u.138135
γ : Type ?u.138138
ι : Type u_1
κ : Type ?u.138144
inst✝¹ : DistribLattice α
inst✝ : OrderBot α
s✝ : Finset ι
t : Finset κ
f✝ : ι → α
g : κ → α
a✝ : α
f : ι → α
a : α
i : ι
s : Finset ι
hi : ¬i ∈ s
h : a ⊓ sup s f = sup s fun i => a ⊓ f i
⊢ a ⊓ sup (cons i s hi) f = sup (cons i s hi) fun i => a ⊓ f i
Theorem: List.sublists'_eq_sublists'Aux
File: Mathlib/Data/List/Sublists.lean

tactic: simp only [sublists', sublists'Aux_eq_array_foldl]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ sublists' l = foldr (fun a r => sublists'Aux a r r) [[]] l

tactic: dsimp only
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ Array.toList
      (foldr (fun a arr => Array.foldl (fun r l => Array.push r (a :: l)) arr arr 0 (Array.size arr)) #[[]] l) =
    foldr
      (fun a r =>
        Array.toList
          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))
      [[]] l

tactic: rw [← List.foldr_hom Array.toList]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ Array.toList
      (foldr (fun a arr => Array.foldl (fun r l => Array.push r (a :: l)) arr arr 0 (Array.size arr)) #[[]] l) =
    foldr
      (fun a r =>
        Array.toList
          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))
      [[]] l

tactic: . rfl
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ foldr ?g₂ (Array.toList #[[]]) l =
    foldr
      (fun a r =>
        Array.toList
          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))
      [[]] l

case g₂
α : Type u
β : Type v
γ : Type w
l : List α
⊢ α → List (List α) → List (List α)

case H
α : Type u
β : Type v
γ : Type w
l : List α
⊢ ∀ (x : α) (y : Array (List α)),
    ?g₂ x (Array.toList y) = Array.toList (Array.foldl (fun r l => Array.push r (x :: l)) y y 0 (Array.size y))

tactic: . intros _ _; congr <;> simp
state_before: case H
α : Type u
β : Type v
γ : Type w
l : List α
⊢ ∀ (x : α) (y : Array (List α)),
    Array.toList
        (Array.foldl (fun r l => Array.push r (x :: l)) (toArray (Array.toList y)) (toArray (Array.toList y)) 0
          (Array.size (toArray (Array.toList y)))) =
      Array.toList (Array.foldl (fun r l => Array.push r (x :: l)) y y 0 (Array.size y))

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
l : List α
⊢ foldr ?g₂ (Array.toList #[[]]) l =
    foldr
      (fun a r =>
        Array.toList
          (Array.foldl (fun r l => Array.push r (a :: l)) (toArray r) (toArray r) 0 (Array.size (toArray r))))
      [[]] l

tactic: intros _ _
state_before: case H
α : Type u
β : Type v
γ : Type w
l : List α
⊢ ∀ (x : α) (y : Array (List α)),
    Array.toList
        (Array.foldl (fun r l => Array.push r (x :: l)) (toArray (Array.toList y)) (toArray (Array.toList y)) 0
          (Array.size (toArray (Array.toList y)))) =
      Array.toList (Array.foldl (fun r l => Array.push r (x :: l)) y y 0 (Array.size y))

tactic: congr <;> simp
state_before: case H
α : Type u
β : Type v
γ : Type w
l : List α
x✝ : α
y✝ : Array (List α)
⊢ Array.toList
      (Array.foldl (fun r l => Array.push r (x✝ :: l)) (toArray (Array.toList y✝)) (toArray (Array.toList y✝)) 0
        (Array.size (toArray (Array.toList y✝)))) =
    Array.toList (Array.foldl (fun r l => Array.push r (x✝ :: l)) y✝ y✝ 0 (Array.size y✝))
Theorem: Nat.lt_div_mul_add
File: Mathlib/Data/Nat/Basic.lean

tactic: rw [← Nat.succ_mul, ← Nat.div_lt_iff_lt_mul hb]
state_before: m n k a b : ℕ
hb : 0 < b
⊢ a < a / b * b + b

tactic: exact Nat.lt_succ_self _
state_before: m n k a b : ℕ
hb : 0 < b
⊢ a / b < succ (a / b)
Theorem: Bool.eq_true_eq_not_eq_false
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: simp
state_before: b : Bool
⊢ (¬b = false) = (b = true)
Theorem: MeasureTheory.lintegral_rpow_nnnorm_lt_top_of_snorm'_lt_top
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [lintegral_rpow_nnnorm_eq_rpow_snorm' hq0_lt]
state_before: α : Type u_1
E : Type ?u.680056
F : Type u_2
G : Type ?u.680062
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
hfq : snorm' f q μ < ⊤
⊢ (∫⁻ (a : α), ↑‖f a‖₊ ^ q ∂μ) < ⊤

tactic: exact ENNReal.rpow_lt_top_of_nonneg (le_of_lt hq0_lt) (ne_of_lt hfq)
state_before: α : Type u_1
E : Type ?u.680056
F : Type u_2
G : Type ?u.680062
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
hq0_lt : 0 < q
hfq : snorm' f q μ < ⊤
⊢ snorm' (fun a => f a) q μ ^ q < ⊤
Theorem: AddSubmonoid.pow_eq_closure_pow_set
File: Mathlib/GroupTheory/Submonoid/Pointwise.lean

tactic: rw [← closure_pow, closure_eq]
state_before: α : Type ?u.290494
G : Type ?u.290497
M : Type ?u.290500
R : Type u_1
A : Type ?u.290506
inst✝² : Monoid M
inst✝¹ : AddMonoid A
inst✝ : Semiring R
s : AddSubmonoid R
n : ℕ
⊢ s ^ n = closure (↑s ^ n)
Theorem: Array.size_swap
File: src/lean/Init/Data/Array/Basic.lean

tactic: show ((a.set i (a.get j)).set (size_set a i _ ▸ j) (a.get i)).size = a.size
state_before: α : Type u_1
a : Array α
i j : Fin (size a)
⊢ size (swap a i j) = size a

tactic: rw [size_set, size_set]
state_before: α : Type u_1
a : Array α
i j : Fin (size a)
⊢ size (set (set a i (get a j)) (Eq.rec j (_ : size a = size (set a i (get a j)))) (get a i)) = size a
Theorem: Module.DualBases.coe_basis
File: Mathlib/LinearAlgebra/Dual.lean

tactic: ext i
state_before: R : Type u_3
M : Type u_1
ι : Type u_2
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
⊢ ↑(basis h) = e

tactic: rw [Basis.apply_eq_iff]
state_before: case h
R : Type u_3
M : Type u_1
ι : Type u_2
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
i : ι
⊢ ↑(basis h) i = e i

tactic: ext j
state_before: case h
R : Type u_3
M : Type u_1
ι : Type u_2
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
i : ι
⊢ ↑(basis h).repr (e i) = Finsupp.single i 1

tactic: rw [h.basis_repr_apply, coeffs_apply, h.eval, Finsupp.single_apply]
state_before: case h.h
R : Type u_3
M : Type u_1
ι : Type u_2
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
i j : ι
⊢ ↑(↑(basis h).repr (e i)) j = ↑(Finsupp.single i 1) j

tactic: convert if_congr (eq_comm (a := j) (b := i)) rfl rfl
state_before: case h.h
R : Type u_3
M : Type u_1
ι : Type u_2
inst✝³ : CommRing R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
e : ι → M
ε : ι → Dual R M
inst✝ : DecidableEq ι
h : DualBases e ε
i j : ι
⊢ (if j = i then 1 else 0) = if i = j then 1 else 0
Theorem: List.rel_filterMap
File: Mathlib/Data/List/Forall2.lean

tactic: rw [filterMap_cons, filterMap_cons]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
f : α → Option γ
g : β → Option δ
hfg : (R ⇒ Option.Rel P) f g
a : α
as : List α
b : β
bs : List β
h₁ : R a b
h₂ : Forall₂ R as bs
⊢ Forall₂ P (filterMap f (a :: as)) (filterMap g (b :: bs))

tactic: exact
  match f a, g b, hfg h₁ with
  | _, _, Option.Rel.none => rel_filterMap (@hfg) h₂
  | _, _, Option.Rel.some h => Forall₂.cons h (rel_filterMap (@hfg) h₂)
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
f : α → Option γ
g : β → Option δ
hfg : (R ⇒ Option.Rel P) f g
a : α
as : List α
b : β
bs : List β
h₁ : R a b
h₂ : Forall₂ R as bs
⊢ Forall₂ P
    (match f a with
    | none => filterMap f as
    | some b => b :: filterMap f as)
    (match g b with
    | none => filterMap g bs
    | some b => b :: filterMap g bs)
Theorem: Dfinsupp.lex_lt_of_lt_of_preorder
File: Mathlib/Data/Dfinsupp/Lex.lean

tactic: obtain ⟨hle, j, hlt⟩ := Pi.lt_def.1 hlt
state_before: ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt : x < y
⊢ ∃ i, (∀ (j : ι), r j i → ↑x j ≤ ↑y j ∧ ↑y j ≤ ↑x j) ∧ ↑x i < ↑y i

tactic: classical
have : (x.neLocus y : Set ι).WellFoundedOn r := (x.neLocus y).finite_toSet.wellFoundedOn
obtain ⟨i, hi, hl⟩ := this.has_min { i | x i < y i } ⟨⟨j, mem_neLocus.2 hlt.ne⟩, hlt⟩
refine' ⟨i, fun k hk ↦ ⟨hle k, _⟩, hi⟩
exact of_not_not fun h ↦ hl ⟨k, mem_neLocus.2 (ne_of_not_le h).symm⟩ ((hle k).lt_of_not_le h) hk
state_before: case intro.intro
ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt✝ : x < y
hle : (fun i => ↑x i) ≤ fun i => ↑y i
j : ι
hlt : ↑x j < ↑y j
⊢ ∃ i, (∀ (j : ι), r j i → ↑x j ≤ ↑y j ∧ ↑y j ≤ ↑x j) ∧ ↑x i < ↑y i

tactic: have : (x.neLocus y : Set ι).WellFoundedOn r := (x.neLocus y).finite_toSet.wellFoundedOn
state_before: case intro.intro
ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt✝ : x < y
hle : (fun i => ↑x i) ≤ fun i => ↑y i
j : ι
hlt : ↑x j < ↑y j
⊢ ∃ i, (∀ (j : ι), r j i → ↑x j ≤ ↑y j ∧ ↑y j ≤ ↑x j) ∧ ↑x i < ↑y i

tactic: obtain ⟨i, hi, hl⟩ := this.has_min { i | x i < y i } ⟨⟨j, mem_neLocus.2 hlt.ne⟩, hlt⟩
state_before: case intro.intro
ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt✝ : x < y
hle : (fun i => ↑x i) ≤ fun i => ↑y i
j : ι
hlt : ↑x j < ↑y j
this : Set.WellFoundedOn (↑(neLocus x y)) r
⊢ ∃ i, (∀ (j : ι), r j i → ↑x j ≤ ↑y j ∧ ↑y j ≤ ↑x j) ∧ ↑x i < ↑y i

tactic: refine' ⟨i, fun k hk ↦ ⟨hle k, _⟩, hi⟩
state_before: case intro.intro.intro.intro
ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt✝ : x < y
hle : (fun i => ↑x i) ≤ fun i => ↑y i
j : ι
hlt : ↑x j < ↑y j
this : Set.WellFoundedOn (↑(neLocus x y)) r
i : ↑↑(neLocus x y)
hi : i ∈ {i | ↑x ↑i < ↑y ↑i}
hl : ∀ (x_1 : ↑↑(neLocus x y)), x_1 ∈ {i | ↑x ↑i < ↑y ↑i} → ¬r ↑x_1 ↑i
⊢ ∃ i, (∀ (j : ι), r j i → ↑x j ≤ ↑y j ∧ ↑y j ≤ ↑x j) ∧ ↑x i < ↑y i

tactic: exact of_not_not fun h ↦ hl ⟨k, mem_neLocus.2 (ne_of_not_le h).symm⟩ ((hle k).lt_of_not_le h) hk
state_before: case intro.intro.intro.intro
ι : Type u_2
α : ι → Type u_1
inst✝² : (i : ι) → Zero (α i)
inst✝¹ : (i : ι) → Preorder (α i)
r : ι → ι → Prop
inst✝ : IsStrictOrder ι r
x y : Π₀ (i : ι), α i
hlt✝ : x < y
hle : (fun i => ↑x i) ≤ fun i => ↑y i
j : ι
hlt : ↑x j < ↑y j
this : Set.WellFoundedOn (↑(neLocus x y)) r
i : ↑↑(neLocus x y)
hi : i ∈ {i | ↑x ↑i < ↑y ↑i}
hl : ∀ (x_1 : ↑↑(neLocus x y)), x_1 ∈ {i | ↑x ↑i < ↑y ↑i} → ¬r ↑x_1 ↑i
k : ι
hk : r k ↑i
⊢ ↑y k ≤ ↑x k
Theorem: spectrum.unit_smul_eq_smul
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: ext x
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
⊢ σ (r • a) = r • σ a

tactic: have x_eq : x = r • r⁻¹ • x := by simp
state_before: case h
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
⊢ x ∈ σ (r • a) ↔ x ∈ r • σ a

tactic: nth_rw 1 [x_eq]
state_before: case h
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
⊢ x ∈ σ (r • a) ↔ x ∈ r • σ a

tactic: rw [smul_mem_smul_iff]
state_before: case h
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
⊢ r • r⁻¹ • x ∈ σ (r • a) ↔ x ∈ r • σ a

tactic: constructor
state_before: case h
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
⊢ r⁻¹ • x ∈ σ a ↔ x ∈ r • σ a

tactic: simp
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
⊢ x = r • r⁻¹ • x

tactic: exact fun h => ⟨r⁻¹ • x, ⟨h, show r • r⁻¹ • x = x by simp⟩⟩
state_before: case h.mp
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
⊢ r⁻¹ • x ∈ σ a → x ∈ r • σ a

tactic: simp
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
h : r⁻¹ • x ∈ σ a
⊢ r • r⁻¹ • x = x

tactic: rintro ⟨w, _, (x'_eq : r • w = x)⟩
state_before: case h.mpr
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
⊢ x ∈ r • σ a → r⁻¹ • x ∈ σ a

tactic: simpa [← x'_eq ]
state_before: case h.mpr.intro.intro
R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
r : Rˣ
x : R
x_eq : x = r • r⁻¹ • x
w : R
left✝ : w ∈ σ a
x'_eq : r • w = x
⊢ r⁻¹ • x ∈ σ a
Theorem: AffineSubspace.isPreconnected_setOf_sSameSide
File: Mathlib/Analysis/Convex/Side.lean

tactic: rcases Set.eq_empty_or_nonempty (s : Set P) with (h | h)
state_before: R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
⊢ IsPreconnected {y | SSameSide s x y}

tactic: rw [coe_eq_bot_iff] at h
state_before: case inl
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : ↑s = ∅
⊢ IsPreconnected {y | SSameSide s x y}

tactic: simp only [h, not_sSameSide_bot]
state_before: case inl
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : s = ⊥
⊢ IsPreconnected {y | SSameSide s x y}

tactic: exact isPreconnected_empty
state_before: case inl
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : s = ⊥
⊢ IsPreconnected {y | False}

tactic: by_cases hx : x ∈ s
state_before: case inr
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : Set.Nonempty ↑s
⊢ IsPreconnected {y | SSameSide s x y}

tactic: simp only [hx, SSameSide, not_true, false_and_iff, and_false_iff]
state_before: case pos
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : Set.Nonempty ↑s
hx : x ∈ s
⊢ IsPreconnected {y | SSameSide s x y}

tactic: exact isPreconnected_empty
state_before: case pos
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : Set.Nonempty ↑s
hx : x ∈ s
⊢ IsPreconnected {y | False}

tactic: exact (isConnected_setOf_sSameSide hx h).isPreconnected
state_before: case neg
R : Type ?u.485293
V : Type u_1
V' : Type ?u.485299
P : Type u_2
P' : Type ?u.485305
inst✝³ : SeminormedAddCommGroup V
inst✝² : NormedSpace ℝ V
inst✝¹ : PseudoMetricSpace P
inst✝ : NormedAddTorsor V P
s : AffineSubspace ℝ P
x : P
h : Set.Nonempty ↑s
hx : ¬x ∈ s
⊢ IsPreconnected {y | SSameSide s x y}
Theorem: smoothManifoldWithCorners_of_contDiffOn
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: haveI : HasGroupoid M (contDiffGroupoid ∞ I) := hasGroupoid_of_pregroupoid _ (h _ _)
state_before: 𝕜 : Type u_1
inst✝⁵ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
H : Type u_3
inst✝² : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
h :
  ∀ (e e' : LocalHomeomorph M H),
    e ∈ atlas H M →
      e' ∈ atlas H M →
        ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ e') ∘ ↑(ModelWithCorners.symm I))
          (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source ∩ range ↑I)
⊢ ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → LocalHomeomorph.symm e ≫ₕ e' ∈ contDiffGroupoid ⊤ I

tactic: apply StructureGroupoid.compatible
state_before: 𝕜 : Type u_1
inst✝⁵ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace 𝕜 E
H : Type u_3
inst✝² : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹ : TopologicalSpace M
inst✝ : ChartedSpace H M
h :
  ∀ (e e' : LocalHomeomorph M H),
    e ∈ atlas H M →
      e' ∈ atlas H M →
        ContDiffOn 𝕜 ⊤ (↑I ∘ ↑(LocalHomeomorph.symm e ≫ₕ e') ∘ ↑(ModelWithCorners.symm I))
          (↑(ModelWithCorners.symm I) ⁻¹' (LocalHomeomorph.symm e ≫ₕ e').toLocalEquiv.source ∩ range ↑I)
this : HasGroupoid M (contDiffGroupoid ⊤ I)
⊢ ∀ {e e' : LocalHomeomorph M H}, e ∈ atlas H M → e' ∈ atlas H M → LocalHomeomorph.symm e ≫ₕ e' ∈ contDiffGroupoid ⊤ I
Theorem: Filter.nhds_top
File: Mathlib/Topology/Filter.lean

tactic: simp [nhds_eq]
state_before: ι : Sort ?u.8600
α : Type u_1
β : Type ?u.8606
X : Type ?u.8609
Y : Type ?u.8612
⊢ 𝓝 ⊤ = ⊤
Theorem: Finsupp.unique_single_eq_iff
File: Mathlib/Data/Finsupp/Defs.lean

tactic: rw [unique_ext_iff, Unique.eq_default a, Unique.eq_default a', single_eq_same, single_eq_same]
state_before: α : Type u_1
β : Type ?u.132948
γ : Type ?u.132951
ι : Type ?u.132954
M : Type u_2
M' : Type ?u.132960
N : Type ?u.132963
P : Type ?u.132966
G : Type ?u.132969
H : Type ?u.132972
R : Type ?u.132975
S : Type ?u.132978
inst✝¹ : Zero M
a a' : α
b : M
inst✝ : Unique α
b' : M
⊢ single a b = single a' b' ↔ b = b'
Theorem: Monotone.pow_right
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: simpa using monotone_const
state_before: β : Type u_1
A : Type ?u.79462
G : Type ?u.79465
M : Type u_2
R : Type ?u.79471
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
f : β → M
hf : Monotone f
⊢ Monotone fun a => f a ^ 0

tactic: simp_rw [pow_succ]
state_before: β : Type u_1
A : Type ?u.79462
G : Type ?u.79465
M : Type u_2
R : Type ?u.79471
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
f : β → M
hf : Monotone f
n : ℕ
⊢ Monotone fun a => f a ^ (n + 1)

tactic: exact hf.mul' (Monotone.pow_right hf _)
state_before: β : Type u_1
A : Type ?u.79462
G : Type ?u.79465
M : Type u_2
R : Type ?u.79471
inst✝⁴ : Monoid M
inst✝³ : Preorder M
inst✝² : Preorder β
inst✝¹ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
f : β → M
hf : Monotone f
n : ℕ
⊢ Monotone fun a => f a * f a ^ n
Theorem: MvPowerSeries.coeff_invOfUnit
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: convert coeff_inv_aux n (↑u⁻¹) φ
state_before: σ : Type u_1
R : Type u_2
inst✝¹ : Ring R
inst✝ : DecidableEq σ
n : σ →₀ ℕ
φ : MvPowerSeries σ R
u : Rˣ
⊢ ↑(coeff R n) (invOfUnit φ u) =
    if n = 0 then ↑u⁻¹
    else -↑u⁻¹ * ∑ x in antidiagonal n, if x.snd < n then ↑(coeff R x.fst) φ * ↑(coeff R x.snd) (invOfUnit φ u) else 0
Theorem: IntermediateField.finrank_adjoin_simple_eq_one_iff
File: Mathlib/FieldTheory/Adjoin.lean

tactic: rw [finrank_adjoin_eq_one_iff]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ finrank F { x // x ∈ F⟮α⟯ } = 1 ↔ α ∈ ⊥

tactic: exact Set.singleton_subset_iff
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ Insert.insert ∅ α ⊆ ↑⊥ ↔ α ∈ ⊥