tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.Functor.quasiIso_of_map_quasiIso
File: Mathlib/Algebra/Homology/QuasiIso.lean

tactic: rw [← Functor.comp_map, ← NatIso.naturality_2 (F.homologyFunctorIso i) f, Functor.comp_map]
state_before: ι : Type u_3
V : Type u
inst✝¹⁴ : Category V
inst✝¹³ : HasZeroMorphisms V
inst✝¹² : HasZeroObject V
inst✝¹¹ : HasEqualizers V
inst✝¹⁰ : HasImages V
inst✝⁹ : HasImageMaps V
inst✝⁸ : HasCokernels V
c : ComplexShape ι
C✝ D✝ E : HomologicalComplex V c
A : Type u_2
inst✝⁷ : Category A
inst✝⁶ : Abelian A
B : Type u_5
inst✝⁵ : Category B
inst✝⁴ : Abelian B
F : A ⥤ B
inst✝³ : Additive F
inst✝² : PreservesFiniteLimits F
inst✝¹ : PreservesFiniteColimits F
inst✝ : Faithful F
C D : HomologicalComplex A c
f : C ⟶ D
hf : QuasiIso ((mapHomologicalComplex F c).map f)
i : ι
⊢ IsIso (F.map ((homologyFunctor A c i).map f))

tactic: infer_instance
state_before: ι : Type u_3
V : Type u
inst✝¹⁴ : Category V
inst✝¹³ : HasZeroMorphisms V
inst✝¹² : HasZeroObject V
inst✝¹¹ : HasEqualizers V
inst✝¹⁰ : HasImages V
inst✝⁹ : HasImageMaps V
inst✝⁸ : HasCokernels V
c : ComplexShape ι
C✝ D✝ E : HomologicalComplex V c
A : Type u_2
inst✝⁷ : Category A
inst✝⁶ : Abelian A
B : Type u_5
inst✝⁵ : Category B
inst✝⁴ : Abelian B
F : A ⥤ B
inst✝³ : Additive F
inst✝² : PreservesFiniteLimits F
inst✝¹ : PreservesFiniteColimits F
inst✝ : Faithful F
C D : HomologicalComplex A c
f : C ⟶ D
hf : QuasiIso ((mapHomologicalComplex F c).map f)
i : ι
⊢ IsIso
    ((homologyFunctorIso F i).hom.app C ≫
      (homologyFunctor B c i).map ((mapHomologicalComplex F c).map f) ≫ (homologyFunctorIso F i).inv.app D)
Theorem: Finite.card_pos_iff
File: Mathlib/Data/Finite/Card.lean

tactic: haveI := Fintype.ofFinite α
state_before: α : Type u_1
β : Type ?u.685
γ : Type ?u.688
inst✝ : Finite α
⊢ 0 < Nat.card α ↔ Nonempty α

tactic: rw [Nat.card_eq_fintype_card, Fintype.card_pos_iff]
state_before: α : Type u_1
β : Type ?u.685
γ : Type ?u.688
inst✝ : Finite α
this : Fintype α
⊢ 0 < Nat.card α ↔ Nonempty α
Theorem: Matrix.det_mul_row
File: Mathlib/LinearAlgebra/Matrix/Determinant.lean

tactic: ext
state_before: m : Type ?u.1456082
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
v : n → R
A : Matrix n n R
⊢ (↑of fun i j => v j * A i j) = A ⬝ diagonal v

tactic: simp [mul_comm]
state_before: case a.h
m : Type ?u.1456082
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
v : n → R
A : Matrix n n R
i✝ x✝ : n
⊢ ↑of (fun i j => v j * A i j) i✝ x✝ = (A ⬝ diagonal v) i✝ x✝

tactic: rw [det_mul, det_diagonal, mul_comm]
state_before: m : Type ?u.1456082
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
v : n → R
A : Matrix n n R
⊢ det (A ⬝ diagonal v) = (∏ i : n, v i) * det A
Theorem: List.countp_false
File: Mathlib/Data/List/Count.lean

tactic: simp
state_before: α : Type u_1
l : List α
p q : α → Bool
⊢ countp (fun x => false) l = 0
Theorem: SimpleGraph.Walk.isPath_copy
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u' v' : V
p : Walk G u v
hu : u = u'
hv : v = v'
⊢ IsPath (Walk.copy p hu hv) ↔ IsPath p

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : Walk G u' v'
⊢ IsPath (Walk.copy p (_ : u' = u') (_ : v' = v')) ↔ IsPath p
Theorem: SimpleGraph.Walk.darts_concat
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> simp [*, concat_nil]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
h : Adj G v w
⊢ darts (concat p h) = List.concat (darts p) { toProd := (v, w), is_adj := h }
Theorem: Std.RBNode.find?_some_mem
File: Std/Data/RBMap/Lemmas.lean

tactic: induction t <;> simp [find?]
state_before: α : Type u_1
x : α
cut : α → Ordering
t : RBNode α
⊢ x ∈ find? cut t → x ∈ t

tactic: split <;> simp (config := {contextual := true}) [*]
state_before: case node
α : Type u_1
x : α
cut : α → Ordering
c✝ : RBColor
l✝ : RBNode α
v✝ : α
r✝ : RBNode α
l_ih✝ : x ∈ find? cut l✝ → x ∈ l✝
r_ih✝ : x ∈ find? cut r✝ → x ∈ r✝
⊢ (match cut v✝ with
      | Ordering.lt => find? cut l✝
      | Ordering.gt => find? cut r✝
      | Ordering.eq => some v✝) =
      some x →
    x = v✝ ∨ x ∈ l✝ ∨ x ∈ r✝
Theorem: Set.image_union
File: Mathlib/Data/Set/Image.lean

tactic: rintro ⟨a, h | h, rfl⟩ <;> [left; right] <;> exact ⟨_, h, rfl⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.29829
ι : Sort ?u.29832
ι' : Sort ?u.29835
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s t : Set α
x : β
⊢ x ∈ f '' (s ∪ t) → x ∈ f '' s ∪ f '' t

tactic: rintro (⟨a, h, rfl⟩ | ⟨a, h, rfl⟩) <;> refine' ⟨_, _, rfl⟩ <;> [left; right] <;> exact h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.29829
ι : Sort ?u.29832
ι' : Sort ?u.29835
f✝ : α → β
s✝ t✝ : Set α
f : α → β
s t : Set α
x : β
⊢ x ∈ f '' s ∪ f '' t → x ∈ f '' (s ∪ t)
Theorem: Filter.map₂_right
File: Mathlib/Order/Filter/NAry.lean

tactic: rw [map₂_swap, map₂_left h]
state_before: α : Type u_1
α' : Type ?u.30550
β : Type u_2
β' : Type ?u.30556
γ : Type ?u.30559
γ' : Type ?u.30562
δ : Type ?u.30565
δ' : Type ?u.30568
ε : Type ?u.30571
ε' : Type ?u.30574
m : α → β → γ
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
h✝ h₁ h₂ : Filter γ
s s₁ s₂ : Set α
t t₁ t₂ : Set β
u : Set γ
v : Set δ
a : α
b : β
c : γ
h : NeBot f
⊢ map₂ (fun x y => y) f g = g
Theorem: affineIndependent_iff_not_collinear
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [collinear_iff_finrank_le_one,
  affineIndependent_iff_not_finrank_vectorSpan_le k p (Fintype.card_fin 3)]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.272580
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p : Fin 3 → P
⊢ AffineIndependent k p ↔ ¬Collinear k (Set.range p)
Theorem: HasStrictFDerivAt.comp
File: Mathlib/Analysis/Calculus/FDeriv/Comp.lean

tactic: simpa only [g'.map_sub, f'.coe_comp'] using (g'.isBigO_comp _ _).trans_isLittleO hf
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_4
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_3
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.116574
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g✝ : E → F
f' f₀' f₁' g'✝ e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
g : F → G
g' : F →L[𝕜] G
hg : HasStrictFDerivAt g g' (f x)
hf : HasStrictFDerivAt f f' x
⊢ (fun x =>
      ↑g' (((fun p => (f p.fst, f p.snd)) x).fst - ((fun p => (f p.fst, f p.snd)) x).snd) -
        ↑(comp g' f') (x.fst - x.snd)) =o[𝓝 (x, x)]
    fun p => p.fst - p.snd
Theorem: Equiv.Perm.toList_formPerm_nil
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: simp
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x✝ x : α
⊢ toList (formPerm []) x = []
Theorem: isLUB_of_mem_closure
File: Mathlib/Topology/Order/Basic.lean

tactic: rw [mem_closure_iff_clusterPt, ClusterPt, inf_comm] at hsf
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : LinearOrder α
inst✝² : LinearOrder β
inst✝¹ : OrderTopology α
inst✝ : OrderTopology β
s : Set α
a : α
hsa : a ∈ upperBounds s
hsf : a ∈ closure s
⊢ IsLUB s a

tactic: exact isLUB_of_mem_nhds hsa (mem_principal_self s)
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁵ : TopologicalSpace α
inst✝⁴ : TopologicalSpace β
inst✝³ : LinearOrder α
inst✝² : LinearOrder β
inst✝¹ : OrderTopology α
inst✝ : OrderTopology β
s : Set α
a : α
hsa : a ∈ upperBounds s
hsf : NeBot (𝓟 s ⊓ 𝓝 a)
⊢ IsLUB s a
Theorem: GaloisInsertion.l_biInf_of_ul_eq_self
File: Mathlib/Order/GaloisConnection.lean

tactic: rw [iInf_subtype', iInf_subtype']
state_before: α : Type u
β : Type v
γ : Type w
ι✝ : Sort x
κ : ι✝ → Sort ?u.43083
a a₁ a₂ : α
b b₁ b₂ : β
l : α → β
u : β → α
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
gi : GaloisInsertion l u
ι : Sort x
p : ι → Prop
f : (i : ι) → p i → α
hf : ∀ (i : ι) (hi : p i), u (l (f i hi)) = f i hi
⊢ l (⨅ (i : ι) (hi : p i), f i hi) = ⨅ (i : ι) (hi : p i), l (f i hi)

tactic: exact gi.l_iInf_of_ul_eq_self _ fun _ => hf _ _
state_before: α : Type u
β : Type v
γ : Type w
ι✝ : Sort x
κ : ι✝ → Sort ?u.43083
a a₁ a₂ : α
b b₁ b₂ : β
l : α → β
u : β → α
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
gi : GaloisInsertion l u
ι : Sort x
p : ι → Prop
f : (i : ι) → p i → α
hf : ∀ (i : ι) (hi : p i), u (l (f i hi)) = f i hi
⊢ l (⨅ (x : { i // p i }), f ↑x (_ : p ↑x)) = ⨅ (x : { i // p i }), l (f ↑x (_ : p ↑x))
Theorem: collinear_iff_finrank_le_one
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: have h := collinear_iff_rank_le_one k s
state_before: k : Type u_2
V : Type u_3
P : Type u_1
ι : Type ?u.233405
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
s : Set P
inst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }
⊢ Collinear k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 1

tactic: rw [← finrank_eq_rank] at h
state_before: k : Type u_2
V : Type u_3
P : Type u_1
ι : Type ?u.233405
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
s : Set P
inst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }
h : Collinear k s ↔ Module.rank k { x // x ∈ vectorSpan k s } ≤ 1
⊢ Collinear k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 1

tactic: exact_mod_cast h
state_before: k : Type u_2
V : Type u_3
P : Type u_1
ι : Type ?u.233405
inst✝⁴ : DivisionRing k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
s : Set P
inst✝ : FiniteDimensional k { x // x ∈ vectorSpan k s }
h : Collinear k s ↔ ↑(finrank k { x // x ∈ vectorSpan k s }) ≤ 1
⊢ Collinear k s ↔ finrank k { x // x ∈ vectorSpan k s } ≤ 1
Theorem: Num.add_zero
File: Mathlib/Data/Num/Lemmas.lean

tactic: cases n <;> rfl
state_before: α : Type ?u.173142
n : Num
⊢ n + 0 = n
Theorem: List.prod_eq_pow_single
File: Mathlib/Data/List/Count.lean

tactic: rw [map_id]
state_before: α : Type u_1
l : List α
inst✝¹ : DecidableEq α
inst✝ : Monoid α
a : α
h : ∀ (a' : α), a' ≠ a → a' ∈ l → a' = 1
⊢ prod l = prod (map id l)
Theorem: WittVector.ghostFun_sub
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: ghost_fun_tac X 0 - X 1, ![x.coeff, y.coeff]
state_before: p : ℕ
R : Type u_1
S : Type ?u.710340
T : Type ?u.710343
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type ?u.710358
β : Type ?u.710361
x y : 𝕎 R
⊢ WittVector.ghostFun (x - y) = WittVector.ghostFun x - WittVector.ghostFun y
Theorem: Polynomial.eval₂_eq_eval_map
File: Mathlib/Data/Polynomial/Eval.lean

tactic: induction p using Polynomial.induction_on' with
| h_add p q hp hq =>
  simp [hp, hq]
| h_monomial n r =>
  simp
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
⊢ eval₂ f x p = eval x (map f p)

tactic: simp [hp, hq]
state_before: case h_add
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q✝ r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
p q : R[X]
hp : eval₂ f x p = eval x (map f p)
hq : eval₂ f x q = eval x (map f q)
⊢ eval₂ f x (p + q) = eval x (map f (p + q))

tactic: simp
state_before: case h_monomial
R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
n : ℕ
r : R
⊢ eval₂ f x (↑(monomial n) r) = eval x (map f (↑(monomial n) r))
Theorem: AddMonoidAlgebra.of'_divOf
File: Mathlib/Algebra/MonoidAlgebra/Division.lean

tactic: simpa only [one_mul] using mul_of'_divOf (1 : AddMonoidAlgebra k G) a
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
a : G
⊢ of' k G a /ᵒᶠ a = 1
Theorem: WithTop.le_of_add_le_add_left
File: Mathlib/Algebra/Order/Monoid/WithTop.lean

tactic: lift a to α using ha
state_before: α : Type u
β : Type v
inst✝² : Add α
a b c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
ha : a ≠ ⊤
h : a + b ≤ a + c
⊢ b ≤ c

tactic: induction c using WithTop.recTopCoe
state_before: case intro
α : Type u
β : Type v
inst✝² : Add α
b c d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a : α
h : ↑a + b ≤ ↑a + c
⊢ b ≤ c

tactic: exact le_top
state_before: case intro.top
α : Type u
β : Type v
inst✝² : Add α
b d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a : α
h : ↑a + b ≤ ↑a + ⊤
⊢ b ≤ ⊤

tactic: induction b using WithTop.recTopCoe
state_before: case intro.coe
α : Type u
β : Type v
inst✝² : Add α
b d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a a✝ : α
h : ↑a + b ≤ ↑a + ↑a✝
⊢ b ≤ ↑a✝

tactic: exact (not_top_le_coe _ h).elim
state_before: case intro.coe.top
α : Type u
β : Type v
inst✝² : Add α
d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a a✝ : α
h : ↑a + ⊤ ≤ ↑a + ↑a✝
⊢ ⊤ ≤ ↑a✝

tactic: simp only [← coe_add, coe_le_coe] at h ⊢
state_before: case intro.coe.coe
α : Type u
β : Type v
inst✝² : Add α
d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a a✝¹ a✝ : α
h : ↑a + ↑a✝ ≤ ↑a + ↑a✝¹
⊢ ↑a✝ ≤ ↑a✝¹

tactic: exact le_of_add_le_add_left h
state_before: case intro.coe.coe
α : Type u
β : Type v
inst✝² : Add α
d : WithTop α
x y : α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
a a✝¹ a✝ : α
h : a + a✝ ≤ a + a✝¹
⊢ a✝ ≤ a✝¹
Theorem: Compactum.subset_cl
File: Mathlib/Topology/Category/Compactum.lean

tactic: simp
state_before: X : Compactum
A : Set X.A
a : X.A
ha : a ∈ A
⊢ str X (incl X a) = a
Theorem: bex_or_left
File: Mathlib/Logic/Basic.lean

tactic: simp only [exists_prop]
state_before: α : Sort u_1
r p q : α → Prop
P Q : (x : α) → p x → Prop
b : Prop
⊢ (∃ x x_1, r x) ↔ (∃ x x_1, r x) ∨ ∃ x x_1, r x

tactic: exact Iff.trans (exists_congr fun x ↦ or_and_right) exists_or
state_before: α : Sort u_1
r p q : α → Prop
P Q : (x : α) → p x → Prop
b : Prop
⊢ (∃ x, (p x ∨ q x) ∧ r x) ↔ (∃ x, p x ∧ r x) ∨ ∃ x, q x ∧ r x
Theorem: inner_self_eq_norm_sq_to_K
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [← inner_self_ofReal_re, ← norm_sq_eq_inner, ofReal_pow]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.1651405
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
⊢ inner x x = ↑‖x‖ ^ 2
Theorem: AlgebraicGeometry.StructureSheaf.toStalk_stalkSpecializes
File: Mathlib/AlgebraicGeometry/StructureSheaf.lean

tactic: dsimp [toStalk]
state_before: R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ toStalk R y ≫ stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h = toStalk R x

tactic: simp [-toOpen_germ]
state_before: R✝ : Type u
inst✝¹ : CommRing R✝
R : Type u_1
inst✝ : CommRing R
x y : PrimeSpectrum R
h : x ⤳ y
⊢ (toOpen R ⊤ ≫ germ (Sheaf.presheaf (structureSheaf R)) { val := y, property := True.intro }) ≫
      stalkSpecializes (Sheaf.presheaf (structureSheaf R)) h =
    toOpen R ⊤ ≫ germ (Sheaf.presheaf (structureSheaf R)) { val := x, property := True.intro }
Theorem: CategoryTheory.congr_app
File: Mathlib/CategoryTheory/NatTrans.lean

tactic: aesop_cat
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F G : C ⥤ D
α β : NatTrans F G
h : α = β
X : C
⊢ α.app X = β.app X
Theorem: Bool.range_eq
File: Mathlib/Data/Bool/Set.lean

tactic: rw [← image_univ, univ_eq, image_pair]
state_before: α : Type u_1
f : Bool → α
⊢ range f = {f false, f true}
Theorem: Stream'.Seq.ofStream_append
File: Mathlib/Data/Seq/Seq.lean

tactic: induction l <;> simp [*, Stream'.nil_append_stream, Stream'.cons_append_stream]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
s : Stream' α
⊢ ↑(l ++ₛ s) = append ↑l ↑s
Theorem: Finset.range_sdiff_zero
File: Mathlib/Data/Finset/Image.lean

tactic: induction' n with k hk
state_before: α : Type ?u.151859
β : Type ?u.151862
γ : Type ?u.151865
n : ℕ
⊢ range (n + 1) \ {0} = image Nat.succ (range n)

tactic: conv_rhs => rw [range_succ]
state_before: case succ
α : Type ?u.151859
β : Type ?u.151862
γ : Type ?u.151865
k : ℕ
hk : range (k + 1) \ {0} = image Nat.succ (range k)
⊢ range (Nat.succ k + 1) \ {0} = image Nat.succ (range (Nat.succ k))

tactic: rw [range_succ, image_insert, ← hk, insert_sdiff_of_not_mem]
state_before: case succ
α : Type ?u.151859
β : Type ?u.151862
γ : Type ?u.151865
k : ℕ
hk : range (k + 1) \ {0} = image Nat.succ (range k)
⊢ range (Nat.succ k + 1) \ {0} = image Nat.succ (insert k (range k))

tactic: simp
state_before: case succ.h
α : Type ?u.151859
β : Type ?u.151862
γ : Type ?u.151865
k : ℕ
hk : range (k + 1) \ {0} = image Nat.succ (range k)
⊢ ¬k + 1 ∈ {0}

tactic: simp
state_before: case zero
α : Type ?u.151859
β : Type ?u.151862
γ : Type ?u.151865
⊢ range (Nat.zero + 1) \ {0} = image Nat.succ (range Nat.zero)
Theorem: Real.Angle.eq_iff_abs_toReal_eq_of_sign_eq
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: simpa [h] using @eq_iff_sign_eq_and_abs_toReal_eq θ ψ
state_before: θ ψ : Angle
h : sign θ = sign ψ
⊢ θ = ψ ↔ abs (toReal θ) = abs (toReal ψ)
Theorem: IsPreconnected.subset_left_of_subset_union
File: Mathlib/Topology/Connected.lean

tactic: by_contra hsv
state_before: α : Type u
β : Type v
ι : Type ?u.29699
π : ι → Type ?u.29704
inst✝ : TopologicalSpace α
s t u v : Set α
hu : IsOpen u
hv : IsOpen v
huv : Disjoint u v
hsuv : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hs : IsPreconnected s
⊢ Disjoint s v

tactic: rw [not_disjoint_iff_nonempty_inter] at hsv
state_before: α : Type u
β : Type v
ι : Type ?u.29699
π : ι → Type ?u.29704
inst✝ : TopologicalSpace α
s t u v : Set α
hu : IsOpen u
hv : IsOpen v
huv : Disjoint u v
hsuv : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hs : IsPreconnected s
hsv : ¬Disjoint s v
⊢ False

tactic: obtain ⟨x, _, hx⟩ := hs u v hu hv hsuv hsu hsv
state_before: α : Type u
β : Type v
ι : Type ?u.29699
π : ι → Type ?u.29704
inst✝ : TopologicalSpace α
s t u v : Set α
hu : IsOpen u
hv : IsOpen v
huv : Disjoint u v
hsuv : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hs : IsPreconnected s
hsv : Set.Nonempty (s ∩ v)
⊢ False

tactic: exact Set.disjoint_iff.1 huv hx
state_before: case intro.intro
α : Type u
β : Type v
ι : Type ?u.29699
π : ι → Type ?u.29704
inst✝ : TopologicalSpace α
s t u v : Set α
hu : IsOpen u
hv : IsOpen v
huv : Disjoint u v
hsuv : s ⊆ u ∪ v
hsu : Set.Nonempty (s ∩ u)
hs : IsPreconnected s
hsv : Set.Nonempty (s ∩ v)
x : α
left✝ : x ∈ s
hx : x ∈ u ∩ v
⊢ False
Theorem: symmDiff_assoc
File: Mathlib/Order/SymmDiff.lean

tactic: rw [symmDiff_symmDiff_left, symmDiff_symmDiff_right]
state_before: ι : Type ?u.71775
α : Type u_1
β : Type ?u.71781
π : ι → Type ?u.71786
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ b ∆ c = a ∆ (b ∆ c)
Theorem: Cycle.subsingleton_reverse_iff
File: Mathlib/Data/List/Cycle.lean

tactic: simp [length_subsingleton_iff]
state_before: α : Type u_1
s : Cycle α
⊢ Subsingleton (reverse s) ↔ Subsingleton s
Theorem: Matrix.vec2_add
File: Mathlib/Data/Matrix/Notation.lean

tactic: rw [cons_add_cons, cons_add_cons, empty_add_empty]
state_before: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : Add α
a₀ a₁ b₀ b₁ : α
⊢ ![a₀, a₁] + ![b₀, b₁] = ![a₀ + b₀, a₁ + b₁]
Theorem: Polynomial.natDegree_sub_eq_of_prod_eq
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [sub_eq_sub_iff_add_eq_add]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q p₁ p₂ q₁ q₂ : R[X]
hp₁ : p₁ ≠ 0
hq₁ : q₁ ≠ 0
hp₂ : p₂ ≠ 0
hq₂ : q₂ ≠ 0
h_eq : p₁ * q₂ = p₂ * q₁
⊢ ↑(natDegree p₁) - ↑(natDegree q₁) = ↑(natDegree p₂) - ↑(natDegree q₂)

tactic: norm_cast
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q p₁ p₂ q₁ q₂ : R[X]
hp₁ : p₁ ≠ 0
hq₁ : q₁ ≠ 0
hp₂ : p₂ ≠ 0
hq₂ : q₂ ≠ 0
h_eq : p₁ * q₂ = p₂ * q₁
⊢ ↑(natDegree p₁) + ↑(natDegree q₂) = ↑(natDegree p₂) + ↑(natDegree q₁)

tactic: rw [← natDegree_mul hp₁ hq₂, ← natDegree_mul hp₂ hq₁, h_eq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q p₁ p₂ q₁ q₂ : R[X]
hp₁ : p₁ ≠ 0
hq₁ : q₁ ≠ 0
hp₂ : p₂ ≠ 0
hq₂ : q₂ ≠ 0
h_eq : p₁ * q₂ = p₂ * q₁
⊢ natDegree p₁ + natDegree q₂ = natDegree p₂ + natDegree q₁
Theorem: essInf_eq_sSup
File: Mathlib/MeasureTheory/Function/EssSup.lean

tactic: dsimp [essInf, liminf, limsInf]
state_before: α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : MeasureTheory.Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : MeasureTheory.Measure α
f : α → β
⊢ essInf f μ = sSup {a | ↑↑μ {x | f x < a} = 0}

tactic: simp only [eventually_map, ae_iff, not_le]
state_before: α : Type u_1
β : Type u_2
m✝ : MeasurableSpace α
μ✝ ν : MeasureTheory.Measure α
inst✝ : ConditionallyCompleteLinearOrder β
x : β
f✝ : α → β
m : MeasurableSpace α
μ : MeasureTheory.Measure α
f : α → β
⊢ sSup {a | ∀ᶠ (n : β) in map f (Measure.ae μ), a ≤ n} = sSup {a | ↑↑μ {x | f x < a} = 0}
Theorem: QuadraticForm.basisRepr_apply
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: rw [← v.equivFun_symm_apply]
state_before: S : Type ?u.690539
R : Type u_1
R₁ : Type ?u.690545
M : Type u_2
M₁ : Type ?u.690551
inst✝⁶ : Semiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M
inst✝³ : AddCommMonoid M₁
inst✝² : Module R M
inst✝¹ : Module R M₁
ι : Type u_3
inst✝ : Fintype ι
v : Basis ι R M
Q : QuadraticForm R M
w : ι → R
⊢ ↑(basisRepr Q v) w = ↑Q (∑ i : ι, w i • ↑v i)

tactic: rfl
state_before: S : Type ?u.690539
R : Type u_1
R₁ : Type ?u.690545
M : Type u_2
M₁ : Type ?u.690551
inst✝⁶ : Semiring R
inst✝⁵ : CommSemiring R₁
inst✝⁴ : AddCommMonoid M
inst✝³ : AddCommMonoid M₁
inst✝² : Module R M
inst✝¹ : Module R M₁
ι : Type u_3
inst✝ : Fintype ι
v : Basis ι R M
Q : QuadraticForm R M
w : ι → R
⊢ ↑(basisRepr Q v) w = ↑Q (↑(LinearEquiv.symm (Basis.equivFun v)) fun i => w i)
Theorem: String.Pos.valid_endPos
File: Std/Data/String/Lemmas.lean

tactic: simp
state_before: s : String
⊢ s.data ++ [] = s.data
Theorem: smul_inv_smul
File: Mathlib/GroupTheory/GroupAction/Group.lean

tactic: rw [smul_smul, mul_right_inv, one_smul]
state_before: α : Type u
β : Type v
γ : Type w
inst✝¹ : Group α
inst✝ : MulAction α β
c : α
x : β
⊢ c • c⁻¹ • x = x
Theorem: IsROrC.inv_re
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [inv_def, normSq_eq_def', mul_comm, ofReal_mul_re, conj_re, div_eq_inv_mul]
state_before: K : Type u_1
E : Type ?u.5379086
inst✝ : IsROrC K
z : K
⊢ ↑re z⁻¹ = ↑re z / ↑normSq z