tasksource/leandojo huggingface dataset:
Theorem: Matrix.blockDiagonal'_apply
File: Mathlib/Data/Matrix/Block.lean

tactic: cases ik
state_before: l : Type ?u.196229
m : Type ?u.196232
n : Type ?u.196235
o : Type u_4
p : Type ?u.196241
q : Type ?u.196244
m' : o → Type u_1
n' : o → Type u_2
p' : o → Type ?u.196259
R : Type ?u.196262
S : Type ?u.196265
α : Type u_3
β : Type ?u.196271
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : (i : o) → Matrix (m' i) (n' i) α
ik : (i : o) × m' i
jk : (i : o) × n' i
⊢ blockDiagonal' M ik jk = if h : ik.fst = jk.fst then M ik.fst ik.snd (cast (_ : n' jk.fst = n' ik.fst) jk.snd) else 0

tactic: cases jk
state_before: case mk
l : Type ?u.196229
m : Type ?u.196232
n : Type ?u.196235
o : Type u_4
p : Type ?u.196241
q : Type ?u.196244
m' : o → Type u_1
n' : o → Type u_2
p' : o → Type ?u.196259
R : Type ?u.196262
S : Type ?u.196265
α : Type u_3
β : Type ?u.196271
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : (i : o) → Matrix (m' i) (n' i) α
jk : (i : o) × n' i
fst✝ : o
snd✝ : m' fst✝
⊢ blockDiagonal' M { fst := fst✝, snd := snd✝ } jk =
    if h : { fst := fst✝, snd := snd✝ }.fst = jk.fst then
      M { fst := fst✝, snd := snd✝ }.fst { fst := fst✝, snd := snd✝ }.snd
        (cast (_ : n' jk.fst = n' { fst := fst✝, snd := snd✝ }.fst) jk.snd)
    else 0

tactic: rfl
state_before: case mk.mk
l : Type ?u.196229
m : Type ?u.196232
n : Type ?u.196235
o : Type u_4
p : Type ?u.196241
q : Type ?u.196244
m' : o → Type u_1
n' : o → Type u_2
p' : o → Type ?u.196259
R : Type ?u.196262
S : Type ?u.196265
α : Type u_3
β : Type ?u.196271
inst✝² : DecidableEq o
inst✝¹ : Zero α
inst✝ : Zero β
M : (i : o) → Matrix (m' i) (n' i) α
fst✝¹ : o
snd✝¹ : m' fst✝¹
fst✝ : o
snd✝ : n' fst✝
⊢ blockDiagonal' M { fst := fst✝¹, snd := snd✝¹ } { fst := fst✝, snd := snd✝ } =
    if h : { fst := fst✝¹, snd := snd✝¹ }.fst = { fst := fst✝, snd := snd✝ }.fst then
      M { fst := fst✝¹, snd := snd✝¹ }.fst { fst := fst✝¹, snd := snd✝¹ }.snd
        (cast (_ : n' { fst := fst✝, snd := snd✝ }.fst = n' { fst := fst✝¹, snd := snd✝¹ }.fst)
          { fst := fst✝, snd := snd✝ }.snd)
    else 0
Theorem: Filter.map_comap
File: Mathlib/Order/Filter/Basic.lean

tactic: refine' le_antisymm (le_inf map_comap_le <| le_principal_iff.2 range_mem_map) _
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.256455
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s : Set α
t : Set β
f : Filter β
m : α → β
⊢ map m (comap m f) = f ⊓ 𝓟 (range m)

tactic: rintro t' ⟨t, ht, sub⟩
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.256455
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s : Set α
t : Set β
f : Filter β
m : α → β
⊢ f ⊓ 𝓟 (range m) ≤ map m (comap m f)

tactic: refine' mem_inf_principal.2 (mem_of_superset ht _)
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.256455
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s : Set α
t✝ : Set β
f : Filter β
m : α → β
t' t : Set β
ht : t ∈ f
sub : m ⁻¹' t ⊆ m ⁻¹' t'
⊢ t' ∈ f ⊓ 𝓟 (range m)

tactic: rintro _ hxt ⟨x, rfl⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.256455
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s : Set α
t✝ : Set β
f : Filter β
m : α → β
t' t : Set β
ht : t ∈ f
sub : m ⁻¹' t ⊆ m ⁻¹' t'
⊢ t ⊆ {x | x ∈ range m → x ∈ t'}

tactic: exact sub hxt
state_before: case intro.intro.intro
α : Type u
β : Type v
γ : Type w
δ : Type ?u.256455
ι : Sort x
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
m✝ : α → β
m' : β → γ
s : Set α
t✝ : Set β
f : Filter β
m : α → β
t' t : Set β
ht : t ∈ f
sub : m ⁻¹' t ⊆ m ⁻¹' t'
x : α
hxt : m x ∈ t
⊢ m x ∈ t'
Theorem: LinearMap.tailing_le_tunnel
File: Mathlib/LinearAlgebra/Prod.lean

tactic: dsimp [tailing, tunnelAux]
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.536871
M₆ : Type ?u.536874
inst✝⁴ : Ring R
N : Type u_1
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M × N →ₗ[R] M
i : Injective ↑f
n : ℕ
⊢ tailing f i n ≤ ↑OrderDual.ofDual (↑(tunnel f i) n)

tactic: rw [Submodule.map_comp, Submodule.map_comp]
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.536871
M₆ : Type ?u.536874
inst✝⁴ : Ring R
N : Type u_1
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M × N →ₗ[R] M
i : Injective ↑f
n : ℕ
⊢ Submodule.map (comp (comp (Submodule.subtype (tunnel' f i n).fst) ↑(LinearEquiv.symm (tunnel' f i n).snd)) f)
      (Submodule.snd R M N) ≤
    ↑OrderDual.ofDual (↑(tunnel f i) n)

tactic: apply Submodule.map_subtype_le
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.536871
M₆ : Type ?u.536874
inst✝⁴ : Ring R
N : Type u_1
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M × N →ₗ[R] M
i : Injective ↑f
n : ℕ
⊢ Submodule.map (Submodule.subtype (tunnel' f i n).fst)
      (Submodule.map (↑(LinearEquiv.symm (tunnel' f i n).snd)) (Submodule.map f (Submodule.snd R M N))) ≤
    ↑OrderDual.ofDual (↑(tunnel f i) n)
Theorem: Filter.eventually_const
File: Mathlib/Order/Filter/Basic.lean

tactic: simp [h]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.140286
ι : Sort x
f : Filter α
t : NeBot f
p : Prop
h : p
⊢ (∀ᶠ (x : α) in f, p) ↔ p

tactic: simpa [h] using t.ne
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.140286
ι : Sort x
f : Filter α
t : NeBot f
p : Prop
h : ¬p
⊢ (∀ᶠ (x : α) in f, p) ↔ p
Theorem: List.isSuffix.isInfix
File: Std/Data/List/Lemmas.lean

tactic: rw [h, append_nil]
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁ <:+ l₂
t : List α✝
h : t ++ l₁ = l₂
⊢ t ++ l₁ ++ [] = l₂
Theorem: CategoryTheory.Comonad.coalgebra_iso_of_iso
File: Mathlib/CategoryTheory/Monad/Algebra.lean

tactic: rw [IsIso.eq_inv_comp f.f, ← f.h_assoc]
state_before: C : Type u₁
inst✝¹ : Category C
G : Comonad C
A B : Coalgebra G
f : A ⟶ B
inst✝ : IsIso f.f
⊢ B.a ≫ G.map (inv f.f) = inv f.f ≫ A.a

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
G : Comonad C
A B : Coalgebra G
f : A ⟶ B
inst✝ : IsIso f.f
⊢ A.a ≫ G.map f.f ≫ G.map (inv f.f) = A.a

tactic: aesop_cat
state_before: C : Type u₁
inst✝¹ : Category C
G : Comonad C
A B : Coalgebra G
f : A ⟶ B
inst✝ : IsIso f.f
⊢ f ≫ Coalgebra.Hom.mk (inv f.f) = 𝟙 A ∧ Coalgebra.Hom.mk (inv f.f) ≫ f = 𝟙 B
Theorem: Relation.TransGen.trans_left
File: Mathlib/Logic/Relation.lean

tactic: induction hbc
state_before: α : Type u_1
β : Type ?u.18673
γ : Type ?u.18676
δ : Type ?u.18679
r : α → α → Prop
a b c d : α
hab : TransGen r a b
hbc : ReflTransGen r b c
⊢ TransGen r a c

tactic: case refl => assumption
state_before: case refl
α : Type u_1
β : Type ?u.18673
γ : Type ?u.18676
δ : Type ?u.18679
r : α → α → Prop
a b c d : α
hab : TransGen r a b
⊢ TransGen r a b

case tail
α : Type u_1
β : Type ?u.18673
γ : Type ?u.18676
δ : Type ?u.18679
r : α → α → Prop
a b c d : α
hab : TransGen r a b
b✝ c✝ : α
a✝¹ : ReflTransGen r b b✝
a✝ : r b✝ c✝
a_ih✝ : TransGen r a b✝
⊢ TransGen r a c✝

tactic: case tail c d _ hcd hac => exact hac.tail hcd
state_before: case tail
α : Type u_1
β : Type ?u.18673
γ : Type ?u.18676
δ : Type ?u.18679
r : α → α → Prop
a b c d : α
hab : TransGen r a b
b✝ c✝ : α
a✝¹ : ReflTransGen r b b✝
a✝ : r b✝ c✝
a_ih✝ : TransGen r a b✝
⊢ TransGen r a c✝

tactic: assumption
state_before: α : Type u_1
β : Type ?u.18673
γ : Type ?u.18676
δ : Type ?u.18679
r : α → α → Prop
a b c d : α
hab : TransGen r a b
⊢ TransGen r a b

tactic: exact hac.tail hcd
state_before: α : Type u_1
β : Type ?u.18673
γ : Type ?u.18676
δ : Type ?u.18679
r : α → α → Prop
a b c✝ d✝ : α
hab : TransGen r a b
c d : α
a✝ : ReflTransGen r b c
hcd : r c d
hac : TransGen r a c
⊢ TransGen r a d
Theorem: Polynomial.toLaurent_X
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: have : (Polynomial.X : R[X]) = monomial 1 1 := by simp [← C_mul_X_pow_eq_monomial]
state_before: R : Type u_1
inst✝ : Semiring R
⊢ ↑toLaurent X = T 1

tactic: simp [this, Polynomial.toLaurent_C_mul_T]
state_before: R : Type u_1
inst✝ : Semiring R
this : X = ↑(monomial 1) 1
⊢ ↑toLaurent X = T 1

tactic: simp [← C_mul_X_pow_eq_monomial]
state_before: R : Type u_1
inst✝ : Semiring R
⊢ X = ↑(monomial 1) 1
Theorem: Std.RBNode.Balanced.balRight
File: Std/Data/RBMap/WF.lean

tactic: unfold balRight
state_before: α✝ : Type u_1
l : RBNode α✝
v : α✝
r : RBNode α✝
cl : RBColor
n : Nat
hl : Balanced l cl (n + 1)
hr : RedRed True r n
⊢ RedRed (cl = red) (balRight l v r) (n + 1)

tactic: split
state_before: α✝ : Type u_1
l : RBNode α✝
v : α✝
r : RBNode α✝
cl : RBColor
n : Nat
hl : Balanced l cl (n + 1)
hr : RedRed True r n
⊢ RedRed (cl = red)
    (match r with
    | node red b y c => node red l v (node black b y c)
    | r =>
      match l with
      | node black a x b => balance1 (node red a x b) v r
      | node red a x (node black b y c) => node red (balance1 (setRed a) x b) y (node black c v r)
      | l => node red l v r)
    (n + 1)

tactic: next b y c => exact
let ⟨cb, cc, hb, hc⟩ := hr.of_red
match cl with
| red => .redred rfl hl (.black hb hc)
| black => .balanced (.red hl (.black hb hc))
state_before: case h_1
α✝ : Type u_1
l : RBNode α✝
v : α✝
cl : RBColor
n : Nat
hl : Balanced l cl (n + 1)
l✝ a✝ : RBNode α✝
x✝ : α✝
b✝ : RBNode α✝
hr : RedRed True (node red a✝ x✝ b✝) n
⊢ RedRed (cl = red) (node red l v (node black a✝ x✝ b✝)) (n + 1)

tactic: exact
let ⟨cb, cc, hb, hc⟩ := hr.of_red
match cl with
| red => .redred rfl hl (.black hb hc)
| black => .balanced (.red hl (.black hb hc))
state_before: α✝ : Type u_1
l : RBNode α✝
v : α✝
cl : RBColor
n : Nat
hl : Balanced l cl (n + 1)
l✝ b : RBNode α✝
y : α✝
c : RBNode α✝
hr : RedRed True (node red b y c) n
⊢ RedRed (cl = red) (node red l v (node black b y c)) (n + 1)

tactic: next H => exact match hr with
| .redred .. => nomatch H _ _ _ rfl
| .balanced hr => match hl with
  | .black hb hc =>
    let ⟨c, h⟩ := RedRed.balance1 (.redred trivial hb hc) hr; .balanced h
  | .red (.black ha hb) (.black hc hd) =>
    let ⟨c, h⟩ := RedRed.balance1 (.redred trivial ha hb) hc; .redred rfl h (.black hd hr)
state_before: case h_2
α✝ : Type u_1
l : RBNode α✝
v : α✝
r : RBNode α✝
cl : RBColor
n : Nat
hl : Balanced l cl (n + 1)
hr : RedRed True r n
l✝ : RBNode α✝
x✝ : ∀ (a : RBNode α✝) (x : α✝) (b : RBNode α✝), r = node red a x b → False
⊢ RedRed (cl = red)
    (match l with
    | node black a x b => balance1 (node red a x b) v r
    | node red a x (node black b y c) => node red (balance1 (setRed a) x b) y (node black c v r)
    | l => node red l v r)
    (n + 1)

tactic: exact match hr with
| .redred .. => nomatch H _ _ _ rfl
| .balanced hr => match hl with
| .black hb hc =>
let ⟨c, h⟩ := RedRed.balance1 (.redred trivial hb hc) hr; .balanced h
| .red (.black ha hb) (.black hc hd) =>
let ⟨c, h⟩ := RedRed.balance1 (.redred trivial ha hb) hc; .redred rfl h (.black hd hr)
state_before: α✝ : Type u_1
l : RBNode α✝
v : α✝
r : RBNode α✝
cl : RBColor
n : Nat
hl : Balanced l cl (n + 1)
hr : RedRed True r n
l✝ : RBNode α✝
H : ∀ (a : RBNode α✝) (x : α✝) (b : RBNode α✝), r = node red a x b → False
⊢ RedRed (cl = red)
    (match l with
    | node black a x b => balance1 (node red a x b) v r
    | node red a x (node black b y c) => node red (balance1 (setRed a) x b) y (node black c v r)
    | l => node red l v r)
    (n + 1)
Theorem: Real.nat_sqrt_le_real_sqrt
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [Real.le_sqrt (Nat.cast_nonneg _) (Nat.cast_nonneg _)]
state_before: a : ℕ
⊢ ↑(Nat.sqrt a) ≤ sqrt ↑a

tactic: norm_cast
state_before: a : ℕ
⊢ ↑(Nat.sqrt a) ^ 2 ≤ ↑a

tactic: exact Nat.sqrt_le' a
state_before: a : ℕ
⊢ Nat.sqrt a ^ 2 ≤ a
Theorem: groupoid_of_pregroupoid_le
File: Mathlib/Geometry/Manifold/ChartedSpace.lean

tactic: refine' StructureGroupoid.le_iff.2 fun e he ↦ _
state_before: H : Type u
H' : Type ?u.32686
M : Type ?u.32689
M' : Type ?u.32692
M'' : Type ?u.32695
inst✝ : TopologicalSpace H
PG₁ PG₂ : Pregroupoid H
h : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s
⊢ Pregroupoid.groupoid PG₁ ≤ Pregroupoid.groupoid PG₂

tactic: rw [mem_groupoid_of_pregroupoid] at he⊢
state_before: H : Type u
H' : Type ?u.32686
M : Type ?u.32689
M' : Type ?u.32692
M'' : Type ?u.32695
inst✝ : TopologicalSpace H
PG₁ PG₂ : Pregroupoid H
h : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s
e : LocalHomeomorph H H
he : e ∈ Pregroupoid.groupoid PG₁
⊢ e ∈ Pregroupoid.groupoid PG₂

tactic: exact ⟨h _ _ he.1, h _ _ he.2⟩
state_before: H : Type u
H' : Type ?u.32686
M : Type ?u.32689
M' : Type ?u.32692
M'' : Type ?u.32695
inst✝ : TopologicalSpace H
PG₁ PG₂ : Pregroupoid H
h : ∀ (f : H → H) (s : Set H), Pregroupoid.property PG₁ f s → Pregroupoid.property PG₂ f s
e : LocalHomeomorph H H
he : Pregroupoid.property PG₁ (↑e) e.source ∧ Pregroupoid.property PG₁ (↑(LocalHomeomorph.symm e)) e.target
⊢ Pregroupoid.property PG₂ (↑e) e.source ∧ Pregroupoid.property PG₂ (↑(LocalHomeomorph.symm e)) e.target
Theorem: WittVector.add_coeff_zero
File: Mathlib/RingTheory/WittVector/Defs.lean

tactic: simp [add_coeff, peval]
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
x y : 𝕎 R
⊢ coeff (x + y) 0 = coeff x 0 + coeff y 0
Theorem: Multiset.sizeOf_lt_sizeOf_of_mem
File: Mathlib/Data/Multiset/Basic.lean

tactic: induction' s using Quot.inductionOn with l a b
state_before: α : Type u_1
β : Type ?u.137282
γ : Type ?u.137285
inst✝ : SizeOf α
x : α
s : Multiset α
hx : x ∈ s
⊢ SizeOf.sizeOf x < SizeOf.sizeOf s

tactic: exact List.sizeOf_lt_sizeOf_of_mem hx
state_before: case h
α : Type u_1
β : Type ?u.137282
γ : Type ?u.137285
inst✝ : SizeOf α
x : α
s : Multiset α
hx✝ : x ∈ s
l : List α
hx : x ∈ Quot.mk Setoid.r l
⊢ SizeOf.sizeOf x < SizeOf.sizeOf (Quot.mk Setoid.r l)
Theorem: Multiset.antidiagonal_cons
File: Mathlib/Data/Multiset/Antidiagonal.lean

tactic: simp only [revzip, reverse_append, quot_mk_to_coe, coe_eq_coe, powersetAux'_cons, cons_coe,
  coe_map, antidiagonal_coe', coe_add]
state_before: α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ antidiagonal (a ::ₘ Quotient.mk (isSetoid α) l) =
    map (Prod.map id (cons a)) (antidiagonal (Quotient.mk (isSetoid α) l)) +
      map (Prod.map (cons a) id) (antidiagonal (Quotient.mk (isSetoid α) l))

tactic: rw [← zip_map, ← zip_map, zip_append, (_ : _ ++ _ = _)]
state_before: α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ zip (powersetAux' l ++ List.map (cons a) (powersetAux' l))
      (reverse (List.map (cons a) (powersetAux' l)) ++ reverse (powersetAux' l)) ~
    List.map (fun x => Prod.map id (cons a) x) (zip (powersetAux' l) (reverse (powersetAux' l))) ++
      List.map (fun x => Prod.map (cons a) id x) (zip (powersetAux' l) (reverse (powersetAux' l)))

tactic: congr
state_before: α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ zip (powersetAux' l) (reverse (List.map (cons a) (powersetAux' l))) ++
      zip (List.map (cons a) (powersetAux' l)) (reverse (powersetAux' l)) =
    zip (List.map id (powersetAux' l)) (List.map (cons a) (reverse (powersetAux' l))) ++
      zip (List.map (cons a) (powersetAux' l)) (List.map id (reverse (powersetAux' l)))

tactic: simp
state_before: case e_a.e_a
α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ powersetAux' l = List.map id (powersetAux' l)

case e_a.e_a
α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ reverse (List.map (cons a) (powersetAux' l)) = List.map (cons a) (reverse (powersetAux' l))

case e_a.e_a
α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ reverse (powersetAux' l) = List.map id (reverse (powersetAux' l))

tactic: rw [map_reverse]
state_before: case e_a.e_a
α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ reverse (List.map (cons a) (powersetAux' l)) = List.map (cons a) (reverse (powersetAux' l))

case e_a.e_a
α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ reverse (powersetAux' l) = List.map id (reverse (powersetAux' l))

tactic: simp
state_before: case e_a.e_a
α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ reverse (powersetAux' l) = List.map id (reverse (powersetAux' l))

tactic: simp
state_before: α : Type u_1
β : Type ?u.9087
a : α
s : Multiset α
l : List α
⊢ length (powersetAux' l) = length (reverse (List.map (cons a) (powersetAux' l)))
Theorem: isLocalRingHom_of_iso
File: Mathlib/Algebra/Category/Ring/Instances.lean

tactic: convert f.inv.isUnit_map ha
state_before: R S : CommRingCat
f : R ≅ S
a : ↑R
ha : IsUnit (↑f.hom a)
⊢ IsUnit a

tactic: exact (RingHom.congr_fun f.hom_inv_id _).symm
state_before: case h.e'_3
R S : CommRingCat
f : R ≅ S
a : ↑R
ha : IsUnit (↑f.hom a)
⊢ a = ↑f.inv (↑f.hom a)
Theorem: CategoryTheory.isSeparator_def
File: Mathlib/CategoryTheory/Generator.lean

tactic: obtain rfl := Set.mem_singleton_iff.1 hH
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
G : C
hG : IsSeparator G
X Y : C
f g : X ⟶ Y
hfg : ∀ (h : G ⟶ X), h ≫ f = h ≫ g
H : C
hH : H ∈ {G}
h : H ⟶ X
⊢ h ≫ f = h ≫ g

tactic: exact hfg h
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
X Y : C
f g : X ⟶ Y
H : C
h : H ⟶ X
hG : IsSeparator H
hfg : ∀ (h : H ⟶ X), h ≫ f = h ≫ g
hH : H ∈ {H}
⊢ h ≫ f = h ≫ g
Theorem: Matrix.neg_vecMul
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.907608
m : Type u_1
n : Type u_2
o : Type ?u.907617
m' : o → Type ?u.907622
n' : o → Type ?u.907627
R : Type ?u.907630
S : Type ?u.907633
α : Type v
β : Type w
γ : Type ?u.907640
inst✝¹ : NonUnitalNonAssocRing α
inst✝ : Fintype m
v : m → α
A : Matrix m n α
⊢ vecMul (-v) A = -vecMul v A

tactic: apply neg_dotProduct
state_before: case h
l : Type ?u.907608
m : Type u_1
n : Type u_2
o : Type ?u.907617
m' : o → Type ?u.907622
n' : o → Type ?u.907627
R : Type ?u.907630
S : Type ?u.907633
α : Type v
β : Type w
γ : Type ?u.907640
inst✝¹ : NonUnitalNonAssocRing α
inst✝ : Fintype m
v : m → α
A : Matrix m n α
x✝ : n
⊢ vecMul (-v) A x✝ = (-vecMul v A) x✝
Theorem: HahnSeries.single_injective
File: Mathlib/RingTheory/HahnSeries.lean

tactic: rw [← single_coeff_same a r, ← single_coeff_same a s, rs]
state_before: Γ : Type u_2
R : Type u_1
inst✝¹ : PartialOrder Γ
inst✝ : Zero R
a✝ b : Γ
r✝ : R
a : Γ
r s : R
rs : ↑(single a) r = ↑(single a) s
⊢ r = s
Theorem: Function.Periodic.map_vadd_multiples
File: Mathlib/Algebra/Periodic.lean

tactic: rcases a with ⟨_, m, rfl⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.136331
f g : α → β
c c₁ c₂ x✝ : α
inst✝ : AddCommMonoid α
hf : Periodic f c
a : { x // x ∈ AddSubmonoid.multiples c }
x : α
⊢ f (a +ᵥ x) = f x

tactic: simp [AddSubmonoid.vadd_def, add_comm _ x, hf.nsmul m x]
state_before: case mk.intro
α : Type u_1
β : Type u_2
γ : Type ?u.136331
f g : α → β
c c₁ c₂ x✝ : α
inst✝ : AddCommMonoid α
hf : Periodic f c
x : α
m : ℕ
⊢ f ({ val := (fun i => i • c) m, property := (_ : ∃ y, (fun i => i • c) y = (fun i => i • c) m) } +ᵥ x) = f x
Theorem: Asymptotics.isBigO_norm_right
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simp only [IsBigO_def]
state_before: α : Type u_1
β : Type ?u.119592
E : Type u_2
F : Type ?u.119598
G : Type ?u.119601
E' : Type ?u.119604
F' : Type u_3
G' : Type ?u.119610
E'' : Type ?u.119613
F'' : Type ?u.119616
G'' : Type ?u.119619
R : Type ?u.119622
R' : Type ?u.119625
𝕜 : Type ?u.119628
𝕜' : Type ?u.119631
inst✝¹² : Norm E
inst✝¹¹ : Norm F
inst✝¹⁰ : Norm G
inst✝⁹ : SeminormedAddCommGroup E'
inst✝⁸ : SeminormedAddCommGroup F'
inst✝⁷ : SeminormedAddCommGroup G'
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedAddCommGroup F''
inst✝⁴ : NormedAddCommGroup G''
inst✝³ : SeminormedRing R
inst✝² : SeminormedRing R'
inst✝¹ : NormedField 𝕜
inst✝ : NormedField 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
u v : α → ℝ
⊢ (f =O[l] fun x => ‖g' x‖) ↔ f =O[l] g'

tactic: exact exists_congr fun _ => isBigOWith_norm_right
state_before: α : Type u_1
β : Type ?u.119592
E : Type u_2
F : Type ?u.119598
G : Type ?u.119601
E' : Type ?u.119604
F' : Type u_3
G' : Type ?u.119610
E'' : Type ?u.119613
F'' : Type ?u.119616
G'' : Type ?u.119619
R : Type ?u.119622
R' : Type ?u.119625
𝕜 : Type ?u.119628
𝕜' : Type ?u.119631
inst✝¹² : Norm E
inst✝¹¹ : Norm F
inst✝¹⁰ : Norm G
inst✝⁹ : SeminormedAddCommGroup E'
inst✝⁸ : SeminormedAddCommGroup F'
inst✝⁷ : SeminormedAddCommGroup G'
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedAddCommGroup F''
inst✝⁴ : NormedAddCommGroup G''
inst✝³ : SeminormedRing R
inst✝² : SeminormedRing R'
inst✝¹ : NormedField 𝕜
inst✝ : NormedField 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
u v : α → ℝ
⊢ (∃ c, IsBigOWith c l f fun x => ‖g' x‖) ↔ ∃ c, IsBigOWith c l f g'
Theorem: Nat.dist_eq_max_sub_min
File: Mathlib/Data/Nat/Dist.lean

tactic: intro h
state_before: i j : ℕ
⊢ i < j → dist i j = max i j - min i j

tactic: rw [max_eq_right_of_lt h, min_eq_left_of_lt h, dist_eq_sub_of_le (Nat.le_of_lt h)]
state_before: i j : ℕ
h : i < j
⊢ dist i j = max i j - min i j

tactic: intro h
state_before: i j : ℕ
⊢ i ≥ j → dist i j = max i j - min i j

tactic: rw [max_eq_left h, min_eq_right h, dist_eq_sub_of_le_right h]
state_before: i j : ℕ
h : i ≥ j
⊢ dist i j = max i j - min i j
Theorem: Metric.uniformEmbedding_iff
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [uniformEmbedding_iff, and_comm, uniformInducing_iff]
state_before: α : Type u
β : Type v
X : Type ?u.62248
ι : Type ?u.62251
inst✝¹ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝ : PseudoMetricSpace β
f : α → β
⊢ UniformEmbedding f ↔
    Function.Injective f ∧
      UniformContinuous f ∧ ∀ (δ : ℝ), δ > 0 → ∃ ε, ε > 0 ∧ ∀ {a b : α}, dist (f a) (f b) < ε → dist a b < δ
Theorem: orthogonalProjectionFn_norm_sq
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: set p := orthogonalProjectionFn K v
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.463344
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K }
v : E
⊢ ‖v‖ * ‖v‖ =
    ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
      ‖orthogonalProjectionFn K v‖ * ‖orthogonalProjectionFn K v‖

tactic: have h' : ⟪v - p, p⟫ = 0 :=
  orthogonalProjectionFn_inner_eq_zero _ _ (orthogonalProjectionFn_mem v)
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.463344
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K }
v : E
p : E := orthogonalProjectionFn K v
⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖

tactic: convert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (v - p) p h' using 2 <;> simp
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.463344
inst✝⁵ : IsROrC 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : CompleteSpace { x // x ∈ K }
v : E
p : E := orthogonalProjectionFn K v
h' : inner (v - p) p = 0
⊢ ‖v‖ * ‖v‖ = ‖v - p‖ * ‖v - p‖ + ‖p‖ * ‖p‖
Theorem: sbtw_const_vadd_iff
File: Mathlib/Analysis/Convex/Between.lean

tactic: rw [Sbtw, Sbtw, wbtw_const_vadd_iff, (AddAction.injective v).ne_iff,
  (AddAction.injective v).ne_iff]
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.117591
P : Type u_3
P' : Type ?u.117597
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
v : V
⊢ Sbtw R (v +ᵥ x) (v +ᵥ y) (v +ᵥ z) ↔ Sbtw R x y z