tasksource/leandojo huggingface dataset:
Theorem: Vector.zipWith_get
File: Mathlib/Data/Vector/Zip.lean

tactic: dsimp only [Vector.zipWith, Vector.get]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : α → β → γ
x : Vector α n
y : Vector β n
i : Fin n
⊢ get (zipWith f x y) i = f (get x i) (get y i)

tactic: cases x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : α → β → γ
x : Vector α n
y : Vector β n
i : Fin n
⊢ List.nthLe (List.zipWith f ↑x ↑y) ↑i (_ : ↑i < List.length (List.zipWith f ↑x ↑y)) =
    f
      (match x, i with
      | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))
      (match y, i with
      | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))

tactic: cases y
state_before: case mk
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : α → β → γ
y : Vector β n
i : Fin n
val✝ : List α
property✝ : List.length val✝ = n
⊢ List.nthLe (List.zipWith f ↑{ val := val✝, property := property✝ } ↑y) ↑i
      (_ : ↑i < List.length (List.zipWith f ↑{ val := val✝, property := property✝ } ↑y)) =
    f
      (match { val := val✝, property := property✝ }, i with
      | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))
      (match y, i with
      | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))

tactic: simp only [List.nthLe_zipWith]
state_before: case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
f : α → β → γ
i : Fin n
val✝¹ : List α
property✝¹ : List.length val✝¹ = n
val✝ : List β
property✝ : List.length val✝ = n
⊢ List.nthLe (List.zipWith f ↑{ val := val✝¹, property := property✝¹ } ↑{ val := val✝, property := property✝ }) ↑i
      (_ :
        ↑i <
          List.length
            (List.zipWith f ↑{ val := val✝¹, property := property✝¹ } ↑{ val := val✝, property := property✝ })) =
    f
      (match { val := val✝¹, property := property✝¹ }, i with
      | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))
      (match { val := val✝, property := property✝ }, i with
      | { val := l, property := h }, i => List.nthLe l ↑i (_ : ↑i < List.length l))
Theorem: Stream'.corec_id_id_eq_const
File: Mathlib/Data/Stream/Init.lean

tactic: rw [corec_def, map_id, iterate_id]
state_before: α : Type u
β : Type v
δ : Type w
a : α
⊢ corec id id a = const a
Theorem: toSubalgebra_toIntermediateField'
File: Mathlib/FieldTheory/IntermediateField.lean

tactic: ext
state_before: K : Type u_1
L : Type u_2
L' : Type ?u.80307
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
⊢ (Subalgebra.toIntermediateField' S hS).toSubalgebra = S

tactic: rfl
state_before: case h
K : Type u_1
L : Type u_2
L' : Type ?u.80307
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S✝ : IntermediateField K L
S : Subalgebra K L
hS : IsField { x // x ∈ S }
x✝ : L
⊢ x✝ ∈ (Subalgebra.toIntermediateField' S hS).toSubalgebra ↔ x✝ ∈ S
Theorem: bit1_eq_one
File: Mathlib/Algebra/CharZero/Lemmas.lean

tactic: rw [show (1 : R) = bit1 0 by simp, bit1_eq_bit1]
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
a : R
⊢ bit1 a = 1 ↔ a = 0

tactic: simp
state_before: R : Type u_1
inst✝² : NonAssocRing R
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
a : R
⊢ 1 = bit1 0
Theorem: Nat.map_swap_divisorsAntidiagonal
File: Mathlib/NumberTheory/Divisors.lean

tactic: rw [← coe_inj, coe_map, Equiv.coe_toEmbedding, Equiv.coe_prodComm,
  Set.image_swap_eq_preimage_swap]
state_before: n : ℕ
⊢ map (Equiv.toEmbedding (Equiv.prodComm ℕ ℕ)) (divisorsAntidiagonal n) = divisorsAntidiagonal n

tactic: ext
state_before: n : ℕ
⊢ Prod.swap ⁻¹' ↑(divisorsAntidiagonal n) = ↑(divisorsAntidiagonal n)

tactic: exact swap_mem_divisorsAntidiagonal
state_before: case h
n : ℕ
x✝ : ℕ × ℕ
⊢ x✝ ∈ Prod.swap ⁻¹' ↑(divisorsAntidiagonal n) ↔ x✝ ∈ ↑(divisorsAntidiagonal n)
Theorem: Finset.sup_bot
File: Mathlib/Data/Finset/Lattice.lean

tactic: obtain rfl | hs := s.eq_empty_or_nonempty
state_before: F : Type ?u.47469
α : Type u_2
β : Type u_1
γ : Type ?u.47478
ι : Type ?u.47481
κ : Type ?u.47484
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s✝ s₁ s₂ : Finset β
f g : β → α
a : α
s : Finset β
⊢ (sup s fun x => ⊥) = ⊥

tactic: exact sup_empty
state_before: case inl
F : Type ?u.47469
α : Type u_2
β : Type u_1
γ : Type ?u.47478
ι : Type ?u.47481
κ : Type ?u.47484
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s s₁ s₂ : Finset β
f g : β → α
a : α
⊢ (sup ∅ fun x => ⊥) = ⊥

tactic: exact sup_const hs _
state_before: case inr
F : Type ?u.47469
α : Type u_2
β : Type u_1
γ : Type ?u.47478
ι : Type ?u.47481
κ : Type ?u.47484
inst✝¹ : SemilatticeSup α
inst✝ : OrderBot α
s✝ s₁ s₂ : Finset β
f g : β → α
a : α
s : Finset β
hs : Finset.Nonempty s
⊢ (sup s fun x => ⊥) = ⊥
Theorem: List.get_set_of_ne
File: Mathlib/Data/List/Basic.lean

tactic: simpa using hj
state_before: ι : Type ?u.111227
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
i j : ℕ
h : i ≠ j
a : α
hj : j < length (set l i a)
⊢ j < length l

tactic: rw [← Option.some_inj, ← List.get?_eq_get, List.get?_set_ne _ _ h, List.get?_eq_get]
state_before: ι : Type ?u.111227
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
i j : ℕ
h : i ≠ j
a : α
hj : j < length (set l i a)
⊢ get (set l i a) { val := j, isLt := hj } = get l { val := j, isLt := (_ : j < length l) }
Theorem: Submonoid.nontrivial_iff_exists_ne_one
File: Mathlib/GroupTheory/Submonoid/Operations.lean

tactic: simp [Ne.def]
state_before: M : Type u_1
N : Type ?u.162461
P : Type ?u.162464
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S✝ : Submonoid M
A : Type ?u.162485
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
S : Submonoid M
⊢ (∃ x hx, { val := x, property := hx } ≠ { val := 1, property := (_ : 1 ∈ S) }) ↔ ∃ x, x ∈ S ∧ x ≠ 1
Theorem: Multiset.map_eq_map
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [← rel_eq, ← rel_eq, rel_map]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.478256
f : α → β
hf : Injective f
s t : Multiset α
⊢ map f s = map f t ↔ s = t

tactic: simp only [hf.eq_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.478256
f : α → β
hf : Injective f
s t : Multiset α
⊢ Rel (fun a b => f a = f b) s t ↔ Rel (fun x x_1 => x = x_1) s t
Theorem: Function.Semiconj₂.isAssociative_left
File: Mathlib/Logic/Function/Conjugate.lean

tactic: simp only [h.eq, @IsAssociative.assoc _ gb]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.3499
f : α → β
ga : α → α → α
gb : β → β → β
inst✝ : IsAssociative β gb
h : Semiconj₂ f ga gb
h_inj : Injective f
x₁ x₂ x₃ : α
⊢ f (ga (ga x₁ x₂) x₃) = f (ga x₁ (ga x₂ x₃))
Theorem: AffineMap.left_vsub_lineMap
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: rw [← neg_vsub_eq_vsub_rev, lineMap_vsub_left, ← smul_neg, neg_vsub_eq_vsub_rev]
state_before: k : Type u_3
V1 : Type u_1
P1 : Type u_2
V2 : Type ?u.553489
P2 : Type ?u.553492
V3 : Type ?u.553495
P3 : Type ?u.553498
V4 : Type ?u.553501
P4 : Type ?u.553504
inst✝¹² : Ring k
inst✝¹¹ : AddCommGroup V1
inst✝¹⁰ : Module k V1
inst✝⁹ : AffineSpace V1 P1
inst✝⁸ : AddCommGroup V2
inst✝⁷ : Module k V2
inst✝⁶ : AffineSpace V2 P2
inst✝⁵ : AddCommGroup V3
inst✝⁴ : Module k V3
inst✝³ : AffineSpace V3 P3
inst✝² : AddCommGroup V4
inst✝¹ : Module k V4
inst✝ : AffineSpace V4 P4
p₀ p₁ : P1
c : k
⊢ p₀ -ᵥ ↑(lineMap p₀ p₁) c = c • (p₀ -ᵥ p₁)
Theorem: Set.mk_preimage_sigma_eq_if
File: Mathlib/Data/Set/Sigma.lean

tactic: split_ifs <;> simp [*]
state_before: ι : Type u_1
ι' : Type ?u.12466
α : ι → Type u_2
β : ι → Type ?u.12476
s s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
u : Set ((i : ι) × α i)
x : (i : ι) × α i
i j : ι
a : α i
inst✝ : DecidablePred fun x => x ∈ s
⊢ Sigma.mk i ⁻¹' Set.Sigma s t = if i ∈ s then t i else ∅
Theorem: Odd.neg_zpow
File: Mathlib/Algebra/Field/Power.lean

tactic: obtain ⟨k, rfl⟩ := h.exists_bit1
state_before: α : Type u_1
inst✝ : DivisionRing α
n : ℤ
h : Odd n
a : α
⊢ (-a) ^ n = -a ^ n

tactic: exact zpow_bit1_neg _ _
state_before: case intro
α : Type u_1
inst✝ : DivisionRing α
a : α
k : ℤ
h : Odd (bit1 k)
⊢ (-a) ^ bit1 k = -a ^ bit1 k
Theorem: LowerSet.compl_iSup
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp only [coe_compl, coe_iSup, compl_iUnion, UpperSet.coe_iSup]
state_before: α : Type u_1
β : Type ?u.89418
γ : Type ?u.89421
ι : Sort u_2
κ : ι → Sort ?u.89429
inst✝ : LE α
s t : LowerSet α
a : α
f : ι → LowerSet α
⊢ ↑(compl (⨆ (i : ι), f i)) = ↑(⨆ (i : ι), compl (f i))
Theorem: TopologicalSpace.productOfMemOpens_injective
File: Mathlib/Topology/ContinuousFunction/T0Sierpinski.lean

tactic: intro x1 x2 h
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
⊢ Function.Injective ↑(productOfMemOpens X)

tactic: apply Inseparable.eq
state_before: X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
x1 x2 : X
h : ↑(productOfMemOpens X) x1 = ↑(productOfMemOpens X) x2
⊢ x1 = x2

tactic: rw [← Inducing.inseparable_iff (productOfMemOpens_inducing X), h]
state_before: case h
X : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : T0Space X
x1 x2 : X
h : ↑(productOfMemOpens X) x1 = ↑(productOfMemOpens X) x2
⊢ Inseparable x1 x2
Theorem: Real.sqrt_eq_zero_of_nonpos
File: Mathlib/Data/Real/Sqrt.lean

tactic: simp [sqrt, Real.toNNReal_eq_zero.2 h]
state_before: x y : ℝ
h : x ≤ 0
⊢ sqrt x = 0
Theorem: selfZpow_of_nonpos
File: Mathlib/RingTheory/Localization/Away/Basic.lean

tactic: by_cases hn0 : n = 0
state_before: R : Type u_2
inst✝³ : CommRing R
x : R
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra R B
inst✝ : IsLocalization.Away x B
n : ℤ
hn : n ≤ 0
⊢ selfZpow x B n = mk' B 1 (Submonoid.pow x (Int.natAbs n))

tactic: simp [hn0, selfZpow_zero, Submonoid.pow_apply]
state_before: case pos
R : Type u_2
inst✝³ : CommRing R
x : R
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra R B
inst✝ : IsLocalization.Away x B
n : ℤ
hn : n ≤ 0
hn0 : n = 0
⊢ selfZpow x B n = mk' B 1 (Submonoid.pow x (Int.natAbs n))

tactic: simp [selfZpow_of_neg _ _ (lt_of_le_of_ne hn hn0)]
state_before: case neg
R : Type u_2
inst✝³ : CommRing R
x : R
B : Type u_1
inst✝² : CommRing B
inst✝¹ : Algebra R B
inst✝ : IsLocalization.Away x B
n : ℤ
hn : n ≤ 0
hn0 : ¬n = 0
⊢ selfZpow x B n = mk' B 1 (Submonoid.pow x (Int.natAbs n))
Theorem: CategoryTheory.Limits.colimit.pre_map'
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: ext1
state_before: J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F✝ : J ⥤ C
inst✝¹ : HasColimitsOfShape J C
G : J ⥤ C
α✝ : F✝ ⟶ G
inst✝ : HasColimitsOfShape K C
F : J ⥤ C
E₁ E₂ : K ⥤ J
α : E₁ ⟶ E₂
⊢ pre F E₁ = colim.map (whiskerRight α F) ≫ pre F E₂

tactic: simp [← Category.assoc]
state_before: case w
J : Type u₁
inst✝⁴ : Category J
K : Type u₂
inst✝³ : Category K
C : Type u
inst✝² : Category C
F✝ : J ⥤ C
inst✝¹ : HasColimitsOfShape J C
G : J ⥤ C
α✝ : F✝ ⟶ G
inst✝ : HasColimitsOfShape K C
F : J ⥤ C
E₁ E₂ : K ⥤ J
α : E₁ ⟶ E₂
j✝ : K
⊢ ι (E₁ ⋙ F) j✝ ≫ pre F E₁ = ι (E₁ ⋙ F) j✝ ≫ colim.map (whiskerRight α F) ≫ pre F E₂
Theorem: Finsupp.support_update_ne_zero
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
simp only [update, h, ite_false, mem_support_iff, ne_eq]
congr; apply Subsingleton.elim
state_before: α : Type u_1
β : Type ?u.155949
γ : Type ?u.155952
ι : Type ?u.155955
M : Type u_2
M' : Type ?u.155961
N : Type ?u.155964
P : Type ?u.155967
G : Type ?u.155970
H : Type ?u.155973
R : Type ?u.155976
S : Type ?u.155979
inst✝¹ : Zero M
f : α →₀ M
a : α
b : M
i : α
inst✝ : DecidableEq α
h : b ≠ 0
⊢ (update f a b).support = insert a f.support

tactic: simp only [update, h, ite_false, mem_support_iff, ne_eq]
state_before: α : Type u_1
β : Type ?u.155949
γ : Type ?u.155952
ι : Type ?u.155955
M : Type u_2
M' : Type ?u.155961
N : Type ?u.155964
P : Type ?u.155967
G : Type ?u.155970
H : Type ?u.155973
R : Type ?u.155976
S : Type ?u.155979
inst✝¹ : Zero M
f : α →₀ M
a : α
b : M
i : α
inst✝ : DecidableEq α
h : b ≠ 0
⊢ (update f a b).support = insert a f.support

tactic: congr
state_before: α : Type u_1
β : Type ?u.155949
γ : Type ?u.155952
ι : Type ?u.155955
M : Type u_2
M' : Type ?u.155961
N : Type ?u.155964
P : Type ?u.155967
G : Type ?u.155970
H : Type ?u.155973
R : Type ?u.155976
S : Type ?u.155979
inst✝¹ : Zero M
f : α →₀ M
a : α
b : M
i : α
inst✝ : DecidableEq α
h : b ≠ 0
⊢ insert a f.support = insert a f.support

tactic: apply Subsingleton.elim
state_before: case h.e_3.h.h.e_2.h
α : Type u_1
β : Type ?u.155949
γ : Type ?u.155952
ι : Type ?u.155955
M : Type u_2
M' : Type ?u.155961
N : Type ?u.155964
P : Type ?u.155967
G : Type ?u.155970
H : Type ?u.155973
R : Type ?u.155976
S : Type ?u.155979
inst✝¹ : Zero M
f : α →₀ M
a : α
b : M
i : α
inst✝ : DecidableEq α
h : b ≠ 0
⊢ (fun a b => Classical.decEq α a b) = fun a b => inst✝ a b
Theorem: nhdsAdjoint_nhds_of_ne
File: Mathlib/Topology/Order.lean

tactic: letI := nhdsAdjoint a f
state_before: α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
⊢ 𝓝 b = pure b

tactic: apply le_antisymm
state_before: α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
⊢ 𝓝 b = pure b

tactic: intro U hU
state_before: case a
α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
⊢ 𝓝 b ≤ pure b

tactic: rw [mem_nhds_iff]
state_before: case a
α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
U : Set α
hU : U ∈ pure b
⊢ U ∈ 𝓝 b

tactic: use {b}
state_before: case a
α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
U : Set α
hU : U ∈ pure b
⊢ ∃ t, t ⊆ U ∧ IsOpen t ∧ b ∈ t

tactic: simp only [and_true_iff, singleton_subset_iff, mem_singleton]
state_before: case a
α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
U : Set α
hU : U ∈ pure b
⊢ {b} ⊆ U ∧ IsOpen {b} ∧ b ∈ {b}

tactic: refine' ⟨hU, fun ha => (h.symm ha).elim⟩
state_before: case a
α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
U : Set α
hU : U ∈ pure b
⊢ b ∈ U ∧ IsOpen {b}

tactic: exact @pure_le_nhds α (nhdsAdjoint a f) b
state_before: case a
α✝ : Type u
β : Type v
α : Type u_1
a : α
f : Filter α
b : α
h : b ≠ a
this : TopologicalSpace α := nhdsAdjoint a f
⊢ pure b ≤ 𝓝 b
Theorem: Orientation.eq_or_eq_neg
File: Mathlib/LinearAlgebra/Orientation.lean

tactic: have e := (finBasis R M).reindex (Fintype.equivFinOfCardEq h).symm
state_before: R : Type u_1
inst✝³ : LinearOrderedField R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
ι : Type u_3
inst✝ : Fintype ι
_i : FiniteDimensional R M
x₁ x₂ : Orientation R M ι
h : Fintype.card ι = finrank R M
⊢ x₁ = x₂ ∨ x₁ = -x₂

tactic: letI := Classical.decEq ι
state_before: R : Type u_1
inst✝³ : LinearOrderedField R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
ι : Type u_3
inst✝ : Fintype ι
_i : FiniteDimensional R M
x₁ x₂ : Orientation R M ι
h : Fintype.card ι = finrank R M
e : Basis ι R M
⊢ x₁ = x₂ ∨ x₁ = -x₂

tactic: have orientation_neg_neg :
  ∀ f : Basis ι R M,  - -Basis.orientation f = Basis.orientation f := by simp
state_before: R : Type u_1
inst✝³ : LinearOrderedField R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
ι : Type u_3
inst✝ : Fintype ι
_i : FiniteDimensional R M
x₁ x₂ : Orientation R M ι
h : Fintype.card ι = finrank R M
e : Basis ι R M
this : DecidableEq ι := Classical.decEq ι
⊢ x₁ = x₂ ∨ x₁ = -x₂

tactic: rcases e.orientation_eq_or_eq_neg x₁ with (h₁ | h₁) <;>
  rcases e.orientation_eq_or_eq_neg x₂ with (h₂ | h₂) <;> simp [h₁, h₂, orientation_neg_neg]
state_before: R : Type u_1
inst✝³ : LinearOrderedField R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
ι : Type u_3
inst✝ : Fintype ι
_i : FiniteDimensional R M
x₁ x₂ : Orientation R M ι
h : Fintype.card ι = finrank R M
e : Basis ι R M
this : DecidableEq ι := Classical.decEq ι
orientation_neg_neg : ∀ (f : Basis ι R M), - -Basis.orientation f = Basis.orientation f
⊢ x₁ = x₂ ∨ x₁ = -x₂

tactic: simp
state_before: R : Type u_1
inst✝³ : LinearOrderedField R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
ι : Type u_3
inst✝ : Fintype ι
_i : FiniteDimensional R M
x₁ x₂ : Orientation R M ι
h : Fintype.card ι = finrank R M
e : Basis ι R M
this : DecidableEq ι := Classical.decEq ι
⊢ ∀ (f : Basis ι R M), - -Basis.orientation f = Basis.orientation f
Theorem: Bool.cond_eq_ite
File: Mathlib/Data/Bool/Basic.lean

tactic: cases b <;> simp
state_before: α : Type u_1
b : Bool
t e : α
⊢ (bif b then t else e) = if b = true then t else e
Theorem: Computability.Encoding.card_le_aleph0
File: Mathlib/Computability/Encoding.lean

tactic: refine' Cardinal.lift_le.1 (e.card_le_card_list.trans _)
state_before: α : Type u
e : Encoding α
inst✝ : Encodable e.Γ
⊢ (#α) ≤ ℵ₀

tactic: simp only [Cardinal.lift_aleph0, Cardinal.lift_le_aleph0]
state_before: α : Type u
e : Encoding α
inst✝ : Encodable e.Γ
⊢ lift (#List e.Γ) ≤ lift ℵ₀

tactic: cases' isEmpty_or_nonempty e.Γ with h h
state_before: α : Type u
e : Encoding α
inst✝ : Encodable e.Γ
⊢ (#List e.Γ) ≤ ℵ₀

tactic: simp only [Cardinal.mk_le_aleph0]
state_before: case inl
α : Type u
e : Encoding α
inst✝ : Encodable e.Γ
h : IsEmpty e.Γ
⊢ (#List e.Γ) ≤ ℵ₀

tactic: rw [Cardinal.mk_list_eq_aleph0]
state_before: case inr
α : Type u
e : Encoding α
inst✝ : Encodable e.Γ
h : Nonempty e.Γ
⊢ (#List e.Γ) ≤ ℵ₀
Theorem: PrimeSpectrum.isClosed_range_comap_of_surjective
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [range_comap_of_surjective _ f hf]
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
S' : Type ?u.417705
inst✝ : CommRing S'
f : R →+* S
hf : Surjective ↑f
⊢ IsClosed (Set.range ↑(comap f))

tactic: exact isClosed_zeroLocus _
state_before: R : Type u
S : Type v
inst✝² : CommRing R
inst✝¹ : CommRing S
S' : Type ?u.417705
inst✝ : CommRing S'
f : R →+* S
hf : Surjective ↑f
⊢ IsClosed (zeroLocus ↑(ker f))
Theorem: Int.odd_coe_nat
File: Mathlib/Data/Int/Parity.lean

tactic: rw [odd_iff_not_even, Nat.odd_iff_not_even, even_coe_nat]
state_before: m n✝ : ℤ
n : ℕ
⊢ Odd ↑n ↔ Odd n
Theorem: Partrec.map
File: Mathlib/Computability/Partrec.lean

tactic: simpa [bind_some_eq_map] using @Partrec.bind _ _ _ _ _ _ _ (fun a => Part.some ∘ (g a)) hf hg
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.61762
σ : Type u_3
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α →. β
g : α → β → σ
hf : Partrec f
hg : Computable₂ g
⊢ Partrec fun a => Part.map (g a) (f a)
Theorem: Mathlib.Tactic.Ring.cast_zero
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp [e]
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a : R
e : a = ↑0
⊢ a = 0
Theorem: Filter.HasBasis.sup_pure
File: Mathlib/Order/Filter/Bases.lean

tactic: simp only [← principal_singleton, hl.sup_principal]
state_before: α : Type u_1
β : Type ?u.43512
γ : Type ?u.43515
ι : Sort u_2
ι' : Sort ?u.43521
l l' : Filter α
p : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
hl : HasBasis l p s
x : α
⊢ HasBasis (l ⊔ pure x) p fun i => s i ∪ {x}
Theorem: Set.preimage_eq_empty
File: Mathlib/Data/Set/Image.lean

tactic: simpa using h.preimage f
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.121366
f : α → β
s✝ t : Set α
s : Set β
h : Disjoint s (range f)
⊢ f ⁻¹' s = ∅
Theorem: PowerSeries.rescale_mul
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: ext
state_before: R : Type u_1
inst✝ : CommSemiring R
a b : R
⊢ rescale (a * b) = RingHom.comp (rescale b) (rescale a)

tactic: simp [← rescale_rescale]
state_before: case a.h
R : Type u_1
inst✝ : CommSemiring R
a b : R
x✝ : PowerSeries R
n✝ : ℕ
⊢ ↑(coeff R n✝) (↑(rescale (a * b)) x✝) = ↑(coeff R n✝) (↑(RingHom.comp (rescale b) (rescale a)) x✝)
Theorem: Finsupp.span_eq_range_total
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [range_total, Subtype.range_coe_subtype, Set.setOf_mem_eq]
state_before: α : Type ?u.372704
M : Type u_1
N : Type ?u.372710
P : Type ?u.372713
R : Type u_2
S : Type ?u.372719
inst✝¹² : Semiring R
inst✝¹¹ : Semiring S
inst✝¹⁰ : AddCommMonoid M
inst✝⁹ : Module R M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : Module R N
inst✝⁶ : AddCommMonoid P
inst✝⁵ : Module R P
α' : Type ?u.372811
M' : Type ?u.372814
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M'
inst✝² : AddCommMonoid M
inst✝¹ : Module R M'
inst✝ : Module R M
v : α → M
v' : α' → M'
s : Set M
⊢ span R s = LinearMap.range (Finsupp.total (↑s) M R Subtype.val)
Theorem: Finsupp.single_add_single_eq_single_add_single
File: Mathlib/Data/Finsupp/Defs.lean

tactic: classical
  simp_rw [FunLike.ext_iff, coe_add, single_eq_pi_single, ← funext_iff]
  exact Pi.single_add_single_eq_single_add_single hu hv
state_before: α : Type u_2
β : Type ?u.473549
γ : Type ?u.473552
ι : Type ?u.473555
M : Type u_1
M' : Type ?u.473561
N : Type ?u.473564
P : Type ?u.473567
G : Type ?u.473570
H : Type ?u.473573
R : Type ?u.473576
S : Type ?u.473579
inst✝ : AddCommMonoid M
k l m n : α
u v : M
hu : u ≠ 0
hv : v ≠ 0
⊢ single k u + single l v = single m u + single n v ↔ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n

tactic: simp_rw [FunLike.ext_iff, coe_add, single_eq_pi_single, ← funext_iff]
state_before: α : Type u_2
β : Type ?u.473549
γ : Type ?u.473552
ι : Type ?u.473555
M : Type u_1
M' : Type ?u.473561
N : Type ?u.473564
P : Type ?u.473567
G : Type ?u.473570
H : Type ?u.473573
R : Type ?u.473576
S : Type ?u.473579
inst✝ : AddCommMonoid M
k l m n : α
u v : M
hu : u ≠ 0
hv : v ≠ 0
⊢ single k u + single l v = single m u + single n v ↔ k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n

tactic: exact Pi.single_add_single_eq_single_add_single hu hv
state_before: α : Type u_2
β : Type ?u.473549
γ : Type ?u.473552
ι : Type ?u.473555
M : Type u_1
M' : Type ?u.473561
N : Type ?u.473564
P : Type ?u.473567
G : Type ?u.473570
H : Type ?u.473573
R : Type ?u.473576
S : Type ?u.473579
inst✝ : AddCommMonoid M
k l m n : α
u v : M
hu : u ≠ 0
hv : v ≠ 0
⊢ ((fun a => (Pi.single k u + Pi.single l v) a) = fun a => (Pi.single m u + Pi.single n v) a) ↔
    k = m ∧ l = n ∨ u = v ∧ k = n ∧ l = m ∨ u + v = 0 ∧ k = l ∧ m = n
Theorem: IsSelfAdjoint.neg
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: simp only [isSelfAdjoint_iff, star_neg, hx.star_eq]
state_before: R : Type u_1
A : Type ?u.8541
inst✝¹ : AddGroup R
inst✝ : StarAddMonoid R
x : R
hx : IsSelfAdjoint x
⊢ IsSelfAdjoint (-x)
Theorem: Dense.biUnion_uniformity_ball
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: refine' iUnion₂_eq_univ_iff.2 fun y => _
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.92331
inst✝ : UniformSpace α
s : Set α
U : Set (α × α)
hs : Dense s
hU : U ∈ 𝓤 α
⊢ (⋃ (x : α) (_ : x ∈ s), ball x U) = univ

tactic: rcases hs.inter_nhds_nonempty (mem_nhds_right y hU) with ⟨x, hxs, hxy : (x, y) ∈ U⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.92331
inst✝ : UniformSpace α
s : Set α
U : Set (α × α)
hs : Dense s
hU : U ∈ 𝓤 α
y : α
⊢ ∃ i j, y ∈ ball i U

tactic: exact ⟨x, hxs, hxy⟩
state_before: case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort ?u.92331
inst✝ : UniformSpace α
s : Set α
U : Set (α × α)
hs : Dense s
hU : U ∈ 𝓤 α
y x : α
hxs : x ∈ s
hxy : (x, y) ∈ U
⊢ ∃ i j, y ∈ ball i U
Theorem: Dfinsupp.single_apply
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: rw [single_eq_pi_single, Pi.single, Function.update]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ i i' : ι
b : β i
⊢ ↑(single i b) i' = if h : i = i' then Eq.recOn h b else 0

tactic: simp [@eq_comm _ i i']
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ i i' : ι
b : β i
⊢ (if h : i' = i then (_ : i = i') ▸ b else OfNat.ofNat 0 i') = if h : i = i' then Eq.recOn h b else 0