tasksource/leandojo huggingface dataset:
Theorem: ConvexOn.convex_epigraph
File: Mathlib/Analysis/Convex/Function.lean

tactic: rintro ⟨x, r⟩ ⟨hx, hr⟩ ⟨y, t⟩ ⟨hy, ht⟩ a b ha hb hab
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.86134
α : Type ?u.86137
β : Type u_3
ι : Type ?u.86143
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
hf : ConvexOn 𝕜 s f
⊢ Convex 𝕜 {p | p.fst ∈ s ∧ f p.fst ≤ p.snd}

tactic: refine' ⟨hf.1 hx hy ha hb hab, _⟩
state_before: case mk.intro.mk.intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.86134
α : Type ?u.86137
β : Type u_3
ι : Type ?u.86143
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
hf : ConvexOn 𝕜 s f
x : E
r : β
hx : (x, r).fst ∈ s
hr : f (x, r).fst ≤ (x, r).snd
y : E
t : β
hy : (y, t).fst ∈ s
ht : f (y, t).fst ≤ (y, t).snd
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • (x, r) + b • (y, t) ∈ {p | p.fst ∈ s ∧ f p.fst ≤ p.snd}

tactic: calc
  f (a • x + b • y) ≤ a • f x + b • f y := hf.2 hx hy ha hb hab
  _ ≤ a • r + b • t := by gcongr
state_before: case mk.intro.mk.intro
𝕜 : Type u_1
E : Type u_2
F : Type ?u.86134
α : Type ?u.86137
β : Type u_3
ι : Type ?u.86143
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
hf : ConvexOn 𝕜 s f
x : E
r : β
hx : (x, r).fst ∈ s
hr : f (x, r).fst ≤ (x, r).snd
y : E
t : β
hy : (y, t).fst ∈ s
ht : f (y, t).fst ≤ (y, t).snd
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ f (a • (x, r) + b • (y, t)).fst ≤ (a • (x, r) + b • (y, t)).snd

tactic: gcongr
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.86134
α : Type ?u.86137
β : Type u_3
ι : Type ?u.86143
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
hf : ConvexOn 𝕜 s f
x : E
r : β
hx : (x, r).fst ∈ s
hr : f (x, r).fst ≤ (x, r).snd
y : E
t : β
hy : (y, t).fst ∈ s
ht : f (y, t).fst ≤ (y, t).snd
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • f x + b • f y ≤ a • r + b • t
Theorem: continuousAt_iff_continuous_left_right
File: Mathlib/Topology/Algebra/Order/LeftRight.lean

tactic: simp only [ContinuousWithinAt, ContinuousAt, ← tendsto_sup, nhds_left_sup_nhds_right]
state_before: α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrder α
inst✝ : TopologicalSpace β
a : α
f : α → β
⊢ ContinuousAt f a ↔ ContinuousWithinAt f (Iic a) a ∧ ContinuousWithinAt f (Ici a) a
Theorem: MeasureTheory.OuterMeasure.boundedBy_top
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: rw [eq_top_iff, le_boundedBy']
state_before: α : Type u_1
m : Set α → ℝ≥0∞
⊢ boundedBy ⊤ = ⊤

tactic: intro s hs
state_before: α : Type u_1
m : Set α → ℝ≥0∞
⊢ ∀ (s : Set α), Set.Nonempty s → ↑⊤ s ≤ ⊤ s

tactic: rw [top_apply hs]
state_before: α : Type u_1
m : Set α → ℝ≥0∞
s : Set α
hs : Set.Nonempty s
⊢ ↑⊤ s ≤ ⊤ s

tactic: exact le_rfl
state_before: α : Type u_1
m : Set α → ℝ≥0∞
s : Set α
hs : Set.Nonempty s
⊢ ⊤ ≤ ⊤ s
Theorem: FirstOrder.Language.BoundedFormula.realize_castLe_of_eq
File: Mathlib/ModelTheory/Semantics.lean

tactic: subst h
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.70714
P : Type ?u.70717
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n✝ l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝ : Fin l → M
m n : ℕ
h : m = n
h' : m ≤ n
φ : BoundedFormula L α m
v : α → M
xs : Fin n → M
⊢ Realize (castLE h' φ) v xs ↔ Realize φ v (xs ∘ ↑(Fin.cast h))

tactic: simp only [castLE_rfl, cast_refl, OrderIso.coe_refl, Function.comp.right_id]
state_before: L : Language
L' : Language
M : Type w
N : Type ?u.70714
P : Type ?u.70717
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
n l : ℕ
φ✝ ψ : BoundedFormula L α l
θ : BoundedFormula L α (Nat.succ l)
v✝ : α → M
xs✝ : Fin l → M
m : ℕ
φ : BoundedFormula L α m
v : α → M
h' : m ≤ m
xs : Fin m → M
⊢ Realize (castLE h' φ) v xs ↔ Realize φ v (xs ∘ ↑(Fin.cast (_ : m = m)))
Theorem: SameRay.of_subsingleton
File: Mathlib/LinearAlgebra/Ray.lean

tactic: rw [Subsingleton.elim x 0]
state_before: R : Type u_2
inst✝⁶ : StrictOrderedCommSemiring R
M : Type u_1
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
N : Type ?u.5473
inst✝³ : AddCommMonoid N
inst✝² : Module R N
ι : Type ?u.5555
inst✝¹ : DecidableEq ι
x✝ y✝ z : M
inst✝ : Subsingleton M
x y : M
⊢ SameRay R x y

tactic: exact zero_left _
state_before: R : Type u_2
inst✝⁶ : StrictOrderedCommSemiring R
M : Type u_1
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
N : Type ?u.5473
inst✝³ : AddCommMonoid N
inst✝² : Module R N
ι : Type ?u.5555
inst✝¹ : DecidableEq ι
x✝ y✝ z : M
inst✝ : Subsingleton M
x y : M
⊢ SameRay R 0 y
Theorem: Algebra.TensorProduct.productMap_range
File: Mathlib/RingTheory/TensorProduct.lean

tactic: rw [productMap, AlgHom.range_comp, map_range, map_sup, ← AlgHom.range_comp, ← AlgHom.range_comp,
  ← AlgHom.comp_assoc, ← AlgHom.comp_assoc, lmul'_comp_includeLeft, lmul'_comp_includeRight,
  AlgHom.id_comp, AlgHom.id_comp]
state_before: R : Type u_2
A : Type u_3
B : Type u_4
S : Type u_1
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Semiring B
inst✝³ : CommSemiring S
inst✝² : Algebra R A
inst✝¹ : Algebra R B
inst✝ : Algebra R S
f : A →ₐ[R] S
g : B →ₐ[R] S
⊢ AlgHom.range (productMap f g) = AlgHom.range f ⊔ AlgHom.range g
Theorem: LieHom.range_eq_map
File: Mathlib/Algebra/Lie/Subalgebra.lean

tactic: ext
state_before: R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
⊢ LieHom.range f = map f ⊤

tactic: simp
state_before: case h
R : Type u
L : Type v
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
L₂ : Type w
inst✝¹ : LieRing L₂
inst✝ : LieAlgebra R L₂
f : L →ₗ⁅R⁆ L₂
K K' : LieSubalgebra R L
K₂ : LieSubalgebra R L₂
x✝ : L₂
⊢ x✝ ∈ LieHom.range f ↔ x✝ ∈ map f ⊤
Theorem: IsUnit.mul_div_mul_right
File: Mathlib/Algebra/Hom/Units.lean

tactic: simp only [div_eq_mul_inv, mul_inv_rev, mul_assoc, h.mul_inv_cancel_left]
state_before: F : Type ?u.60370
G : Type ?u.60373
α : Type u_1
M : Type ?u.60379
N : Type ?u.60382
inst✝ : DivisionMonoid α
a✝ b✝ c : α
h : IsUnit c
a b : α
⊢ a * c / (b * c) = a / b
Theorem: linearIndependent_le_span_finset
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: simpa only [Finset.coe_sort_coe, Fintype.card_coe] using linearIndependent_le_span v i w s
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι✝ : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.355098
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
ι : Type u_1
v : ι → M
i : LinearIndependent R v
w : Finset M
s : span R ↑w = ⊤
⊢ (#ι) ≤ ↑(Finset.card w)
Theorem: Std.HashMap.Imp.WF.empty
File: Std/Data/HashMap/Basic.lean

tactic: unfold empty
state_before: α : Type u_1
β : Type u_2
n : Nat
inst✝¹ : BEq α
inst✝ : Hashable α
⊢ WF (Imp.empty n)

tactic: apply empty'
state_before: α : Type u_1
β : Type u_2
n : Nat
inst✝¹ : BEq α
inst✝ : Hashable α
⊢ WF
    (let nbuckets := numBucketsForCapacity n;
    let n_1 :=
      if h : nbuckets = 0 then { val := 8, property := empty.proof_1 }
      else { val := nbuckets, property := (_ : 0 < nbuckets) };
    Imp.empty' n_1.val)
Theorem: Fin.add_one_lt_iff
File: Mathlib/Data/Fin/Basic.lean

tactic: simp only [lt_iff_val_lt_val, val_add, val_last, ext_iff]
state_before: n✝ m n : ℕ
k : Fin (n + 2)
⊢ k + 1 < k ↔ k = last (n + 1)

tactic: cases' k with k hk
state_before: n✝ m n : ℕ
k : Fin (n + 2)
⊢ (↑k + ↑1) % (n + 2) < ↑k ↔ ↑k = n + 1

tactic: rcases(le_of_lt_succ hk).eq_or_lt with (rfl | hk')
state_before: case mk
n✝ m n k : ℕ
hk : k < n + 2
⊢ (↑{ val := k, isLt := hk } + ↑1) % (n + 2) < ↑{ val := k, isLt := hk } ↔ ↑{ val := k, isLt := hk } = n + 1

tactic: simp
state_before: case mk.inl
n✝ m n : ℕ
hk : n + 1 < n + 2
⊢ (↑{ val := n + 1, isLt := hk } + ↑1) % (n + 2) < ↑{ val := n + 1, isLt := hk } ↔ ↑{ val := n + 1, isLt := hk } = n + 1

tactic: simp [hk'.ne, mod_eq_of_lt (succ_lt_succ hk'), le_succ _]
state_before: case mk.inr
n✝ m n k : ℕ
hk : k < n + 2
hk' : k < n + 1
⊢ (↑{ val := k, isLt := hk } + ↑1) % (n + 2) < ↑{ val := k, isLt := hk } ↔ ↑{ val := k, isLt := hk } = n + 1
Theorem: congrArg₂
File: Std/Logic.lean

tactic: subst hx hy
state_before: α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β → γ
x x' : α
y y' : β
hx : x = x'
hy : y = y'
⊢ f x y = f x' y'

tactic: rfl
state_before: α : Sort u_1
β : Sort u_2
γ : Sort u_3
f : α → β → γ
x : α
y : β
⊢ f x y = f x y
Theorem: CategoryTheory.op_inv
File: Mathlib/CategoryTheory/Opposites.lean

tactic: aesop_cat_nonterminal
state_before: C : Type u₁
inst✝¹ : Category C
X Y : C
f : X ⟶ Y
inst✝ : IsIso f
⊢ (inv f).op = inv f.op

tactic: rw [← op_comp, IsIso.inv_hom_id, op_id]
state_before: case hom_inv_id
C : Type u₁
inst : Category C
X Y : C
f : X ⟶ Y
inst_1 : IsIso f
⊢ f.op ≫ (inv f).op = 𝟙 (op Y)
Theorem: List.toFinsupp_cons_eq_single_add_embDomain
File: Mathlib/Data/List/ToFinsupp.lean

tactic: convert toFinsupp_append [x] xs using 3
state_before: M : Type ?u.15101
inst✝⁴ : Zero M
l : List M
inst✝³ : DecidablePred fun x => getD l x 0 ≠ 0
n : ℕ
R : Type u_1
inst✝² : AddZeroClass R
x : R
xs : List R
inst✝¹ : DecidablePred fun x_1 => getD (x :: xs) x_1 0 ≠ 0
inst✝ : DecidablePred fun x => getD xs x 0 ≠ 0
⊢ toFinsupp (x :: xs) =
    Finsupp.single 0 x + Finsupp.embDomain { toFun := Nat.succ, inj' := Nat.succ_injective } (toFinsupp xs)

tactic: exact (toFinsupp_singleton x).symm
state_before: case h.e'_3.h.e'_5
M : Type ?u.15101
inst✝⁴ : Zero M
l : List M
inst✝³ : DecidablePred fun x => getD l x 0 ≠ 0
n : ℕ
R : Type u_1
inst✝² : AddZeroClass R
x : R
xs : List R
inst✝¹ : DecidablePred fun x_1 => getD (x :: xs) x_1 0 ≠ 0
inst✝ : DecidablePred fun x => getD xs x 0 ≠ 0
⊢ Finsupp.single 0 x = toFinsupp [x]

tactic: ext n
state_before: case h.e'_3.h.e'_6.h.e'_5
M : Type ?u.15101
inst✝⁴ : Zero M
l : List M
inst✝³ : DecidablePred fun x => getD l x 0 ≠ 0
n : ℕ
R : Type u_1
inst✝² : AddZeroClass R
x : R
xs : List R
inst✝¹ : DecidablePred fun x_1 => getD (x :: xs) x_1 0 ≠ 0
inst✝ : DecidablePred fun x => getD xs x 0 ≠ 0
⊢ { toFun := Nat.succ, inj' := Nat.succ_injective } = addLeftEmbedding (length [x])

tactic: exact add_comm n 1
state_before: case h.e'_3.h.e'_6.h.e'_5.h
M : Type ?u.15101
inst✝⁴ : Zero M
l : List M
inst✝³ : DecidablePred fun x => getD l x 0 ≠ 0
n✝ : ℕ
R : Type u_1
inst✝² : AddZeroClass R
x : R
xs : List R
inst✝¹ : DecidablePred fun x_1 => getD (x :: xs) x_1 0 ≠ 0
inst✝ : DecidablePred fun x => getD xs x 0 ≠ 0
n : ℕ
⊢ ↑{ toFun := Nat.succ, inj' := Nat.succ_injective } n = ↑(addLeftEmbedding (length [x])) n
Theorem: Turing.PartrecToTM2.codeSupp'_self
File: Mathlib/Computability/TMToPartrec.lean

tactic: cases c <;> first |rfl|exact Finset.subset_union_left _ _
state_before: c : Code
k : Cont'
⊢ trStmts₁ (trNormal c k) ⊆ codeSupp' c k

tactic: rfl
state_before: case fix
k : Cont'
a✝ : Code
⊢ trStmts₁ (trNormal (Code.fix a✝) k) ⊆ codeSupp' (Code.fix a✝) k

tactic: exact Finset.subset_union_left _ _
state_before: case fix
k : Cont'
a✝ : Code
⊢ trStmts₁ (trNormal (Code.fix a✝) k) ⊆ codeSupp' (Code.fix a✝) k
Theorem: sSup_div
File: Mathlib/Algebra/Order/Pointwise.lean

tactic: simp_rw [div_eq_mul_inv, sSup_mul, sSup_inv]
state_before: α : Type u_1
inst✝³ : CompleteLattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
s t : Set α
⊢ sSup (s / t) = sSup s / sInf t
Theorem: Subtype.coe_eq_top_iff
File: Mathlib/Order/BoundedOrder.lean

tactic: rw [← coe_top htop, ext_iff]
state_before: α : Type u
β : Type v
γ : Type ?u.39622
δ : Type ?u.39625
p : α → Prop
inst✝² : PartialOrder α
inst✝¹ : OrderTop α
inst✝ : OrderTop (Subtype p)
htop : p ⊤
x : { x // p x }
⊢ ↑x = ⊤ ↔ x = ⊤
Theorem: MvPowerSeries.invOfUnit_eq'
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [← invOfUnit_eq φ (h.symm ▸ u.ne_zero)]
state_before: σ : Type u_1
R : Type ?u.1782406
k : Type u_2
inst✝ : Field k
φ : MvPowerSeries σ k
u : kˣ
h : ↑(constantCoeff σ k) φ = ↑u
⊢ invOfUnit φ u = φ⁻¹

tactic: apply congrArg (invOfUnit φ)
state_before: σ : Type u_1
R : Type ?u.1782406
k : Type u_2
inst✝ : Field k
φ : MvPowerSeries σ k
u : kˣ
h : ↑(constantCoeff σ k) φ = ↑u
⊢ invOfUnit φ u = invOfUnit φ (Units.mk0 (↑(constantCoeff σ k) φ) (_ : ↑(constantCoeff σ k) φ ≠ 0))

tactic: rw [Units.ext_iff]
state_before: σ : Type u_1
R : Type ?u.1782406
k : Type u_2
inst✝ : Field k
φ : MvPowerSeries σ k
u : kˣ
h : ↑(constantCoeff σ k) φ = ↑u
⊢ u = Units.mk0 (↑(constantCoeff σ k) φ) (_ : ↑(constantCoeff σ k) φ ≠ 0)

tactic: exact h.symm
state_before: σ : Type u_1
R : Type ?u.1782406
k : Type u_2
inst✝ : Field k
φ : MvPowerSeries σ k
u : kˣ
h : ↑(constantCoeff σ k) φ = ↑u
⊢ ↑u = ↑(Units.mk0 (↑(constantCoeff σ k) φ) (_ : ↑(constantCoeff σ k) φ ≠ 0))
Theorem: Stream'.map_cons
File: Mathlib/Data/Stream/Init.lean

tactic: rw [← Stream'.eta (map f (a::s)), map_eq]
state_before: α : Type u
β : Type v
δ : Type w
f : α → β
a : α
s : Stream' α
⊢ map f (a :: s) = f a :: map f s

tactic: rfl
state_before: α : Type u
β : Type v
δ : Type w
f : α → β
a : α
s : Stream' α
⊢ head (f (head (a :: s)) :: map f (tail (a :: s))) :: tail (f (head (a :: s)) :: map f (tail (a :: s))) =
    f a :: map f s
Theorem: Ordinal.relIso_enum
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: convert hr using 1
state_before: α✝ : Type ?u.98043
β✝ : Type ?u.98046
γ : Type ?u.98049
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≃r s
o : Ordinal
hr : o < type r
⊢ o < type s

tactic: apply Quotient.sound
state_before: case h.e'_4
α✝ : Type ?u.98043
β✝ : Type ?u.98046
γ : Type ?u.98049
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≃r s
o : Ordinal
hr : o < type r
⊢ type s = type r

tactic: exact ⟨f.symm⟩
state_before: case h.e'_4.a
α✝ : Type ?u.98043
β✝ : Type ?u.98046
γ : Type ?u.98049
r✝ : α✝ → α✝ → Prop
s✝ : β✝ → β✝ → Prop
t : γ → γ → Prop
α β : Type u
r : α → α → Prop
s : β → β → Prop
inst✝¹ : IsWellOrder α r
inst✝ : IsWellOrder β s
f : r ≃r s
o : Ordinal
hr : o < type r
⊢ { α := β, r := s, wo := inst✝ } ≈ { α := α, r := r, wo := inst✝¹ }
Theorem: CommGroupWithZero.coe_normUnit
File: Mathlib/Algebra/GCDMonoid/Basic.lean

tactic: simp [normUnit, h0]
state_before: α : Type ?u.350228
G₀ : Type u_1
inst✝¹ : CommGroupWithZero G₀
inst✝ : DecidableEq G₀
a : G₀
h0 : a ≠ 0
⊢ ↑(normUnit a) = a⁻¹
Theorem: Set.toFinset_setOf
File: Mathlib/Data/Fintype/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.93002
γ : Type ?u.93005
s t : Set α
inst✝² : Fintype α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype ↑{x | p x}
⊢ toFinset {x | p x} = filter p Finset.univ

tactic: simp
state_before: case a
α : Type u_1
β : Type ?u.93002
γ : Type ?u.93005
s t : Set α
inst✝² : Fintype α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype ↑{x | p x}
a✝ : α
⊢ a✝ ∈ toFinset {x | p x} ↔ a✝ ∈ filter p Finset.univ
Theorem: Finset.image₂_singleton
File: Mathlib/Data/Finset/NAry.lean

tactic: simp
state_before: α : Type u_2
α' : Type ?u.33328
β : Type u_3
β' : Type ?u.33334
γ : Type u_1
γ' : Type ?u.33340
δ : Type ?u.33343
δ' : Type ?u.33346
ε : Type ?u.33349
ε' : Type ?u.33352
ζ : Type ?u.33355
ζ' : Type ?u.33358
ν : Type ?u.33361
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
⊢ image₂ f {a} {b} = {f a b}
Theorem: CategoryTheory.Limits.BinaryCofan.isColimit_iff_isIso_inl
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: constructor
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) ↔ IsIso (inl c)

tactic: rintro ⟨H⟩
state_before: case mp
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ Nonempty (IsColimit c) → IsIso (inl c)

tactic: obtain ⟨l, hl, -⟩ := BinaryCofan.IsColimit.desc' H (𝟙 X) (h.to X)
state_before: case mp.intro
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
⊢ IsIso (inl c)

tactic: refine ⟨⟨l, hl, BinaryCofan.IsColimit.hom_ext H (?_) (h.hom_ext _ _)⟩⟩
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : inl c ≫ l = 𝟙 X
⊢ IsIso (inl c)

tactic: rw [Category.comp_id]
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : inl c ≫ l = 𝟙 X
⊢ inl c ≫ l ≫ inl c = inl c ≫ 𝟙 (((Functor.const (Discrete WalkingPair)).obj c.pt).obj { as := left })

tactic: rwa [Category.assoc,Category.id_comp] at e
state_before: case mp.intro.mk.intro
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
H : IsColimit c
l : c.pt ⟶ X
hl : inl c ≫ l = 𝟙 X
e : (inl c ≫ l) ≫ inl c = 𝟙 X ≫ inl c
⊢ inl c ≫ l ≫ inl c = inl c

tactic: intro
state_before: case mpr
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
⊢ IsIso (inl c) → Nonempty (IsColimit c)

tactic: exact
  ⟨BinaryCofan.IsColimit.mk _ (fun f _ => inv c.inl ≫ f)
      (fun _ _ => IsIso.hom_inv_id_assoc _ _) (fun _ _ => h.hom_ext _ _) fun _ _ _ e _ =>
      (IsIso.eq_inv_comp _).mpr e⟩
state_before: case mpr
C : Type u
inst✝ : Category C
X✝ Y✝ X Y : C
h : IsInitial Y
c : BinaryCofan X Y
a✝ : IsIso (inl c)
⊢ Nonempty (IsColimit c)
Theorem: Complex.arg_div_coe_angle
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: rw [div_eq_mul_inv, arg_mul_coe_angle hx (inv_ne_zero hy), arg_inv_coe_angle, sub_eq_add_neg]
state_before: x y : ℂ
hx : x ≠ 0
hy : y ≠ 0
⊢ ↑(arg (x / y)) = ↑(arg x) - ↑(arg y)
Theorem: Polynomial.contract_expand
File: Mathlib/Data/Polynomial/Expand.lean

tactic: ext
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
hp : p ≠ 0
⊢ contract p (↑(expand R p) f) = f

tactic: simp [coeff_contract hp, coeff_expand hp.bot_lt, Nat.mul_div_cancel _ hp.bot_lt]
state_before: case a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
hp : p ≠ 0
n✝ : ℕ
⊢ coeff (contract p (↑(expand R p) f)) n✝ = coeff f n✝
Theorem: MonoidHom.map_finprod_mem'
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: rw [g.map_finprod]
state_before: α : Type u_3
β : Type ?u.282817
ι : Type ?u.282820
G : Type ?u.282823
M : Type u_1
N : Type u_2
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f✝ g✝ : α → M
a b : α
s t : Set α
f : α → M
g : M →* N
h₀ : Set.Finite (s ∩ mulSupport f)
⊢ ↑g (∏ᶠ (j : α) (_ : j ∈ s), f j) = ∏ᶠ (i : α) (_ : i ∈ s), ↑g (f i)

tactic: simp only [g.map_finprod_Prop]
state_before: α : Type u_3
β : Type ?u.282817
ι : Type ?u.282820
G : Type ?u.282823
M : Type u_1
N : Type u_2
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f✝ g✝ : α → M
a b : α
s t : Set α
f : α → M
g : M →* N
h₀ : Set.Finite (s ∩ mulSupport f)
⊢ (∏ᶠ (i : α), ↑g (∏ᶠ (_ : i ∈ s), f i)) = ∏ᶠ (i : α) (_ : i ∈ s), ↑g (f i)

tactic: simpa only [finprod_eq_mulIndicator_apply, mulSupport_mulIndicator]
state_before: α : Type u_3
β : Type ?u.282817
ι : Type ?u.282820
G : Type ?u.282823
M : Type u_1
N : Type u_2
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f✝ g✝ : α → M
a b : α
s t : Set α
f : α → M
g : M →* N
h₀ : Set.Finite (s ∩ mulSupport f)
⊢ Set.Finite (mulSupport fun j => ∏ᶠ (_ : j ∈ s), f j)
Theorem: List.Nat.antidiagonalTuple_two
File: Mathlib/Data/Fin/Tuple/NatAntidiagonal.lean

tactic: rw [antidiagonalTuple]
state_before: n : ℕ
⊢ antidiagonalTuple 2 n = map (fun i => ![i.fst, i.snd]) (antidiagonal n)

tactic: simp_rw [antidiagonalTuple_one, List.map_singleton]
state_before: n : ℕ
⊢ (List.bind (antidiagonal n) fun ni => map (fun x => Fin.cons ni.fst x) (antidiagonalTuple 1 ni.snd)) =
    map (fun i => ![i.fst, i.snd]) (antidiagonal n)

tactic: rw [List.map_eq_bind]
state_before: n : ℕ
⊢ (List.bind (antidiagonal n) fun ni => [Fin.cons ni.fst ![ni.snd]]) = map (fun i => ![i.fst, i.snd]) (antidiagonal n)

tactic: rfl
state_before: n : ℕ
⊢ (List.bind (antidiagonal n) fun ni => [Fin.cons ni.fst ![ni.snd]]) =
    List.bind (antidiagonal n) fun x => [![x.fst, x.snd]]
Theorem: Commute.orderOf_dvd_lcm_mul
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: by_cases h0 : orderOf x = 0
state_before: G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
h : _root_.Commute x y
⊢ orderOf y ∣ lcm (orderOf x) (orderOf (x * y))

tactic: conv_lhs =>
  rw [← one_mul y, ← pow_orderOf_eq_one x, ← succ_pred_eq_of_pos (Nat.pos_of_ne_zero h0),
    _root_.pow_succ', mul_assoc]
state_before: case neg
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
h : _root_.Commute x y
h0 : ¬orderOf x = 0
⊢ orderOf y ∣ lcm (orderOf x) (orderOf (x * y))

tactic: exact
  (((Commute.refl x).mul_right h).pow_left _).orderOf_mul_dvd_lcm.trans
    (lcm_dvd_iff.2 ⟨(orderOf_pow_dvd _).trans (dvd_lcm_left _ _), dvd_lcm_right _ _⟩)
state_before: case neg
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
h : _root_.Commute x y
h0 : ¬orderOf x = 0
⊢ orderOf (x ^ pred (orderOf x) * (x * y)) ∣ lcm (orderOf x) (orderOf (x * y))

tactic: rw [h0, lcm_zero_left]
state_before: case pos
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
h : _root_.Commute x y
h0 : orderOf x = 0
⊢ orderOf y ∣ lcm (orderOf x) (orderOf (x * y))

tactic: apply dvd_zero
state_before: case pos
G : Type u
A : Type v
x y : G
a b : A
n m : ℕ
inst✝¹ : Monoid G
inst✝ : AddMonoid A
h : _root_.Commute x y
h0 : orderOf x = 0
⊢ orderOf y ∣ 0
Theorem: Ordnode.Sized.eq_node'
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [h.1]
state_before: α : Type u_1
s : ℕ
l : Ordnode α
x : α
r : Ordnode α
h : Sized (node s l x r)
⊢ node s l x r = Ordnode.node' l x r
Theorem: PrimeSpectrum.isBasis_basic_opens
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: unfold TopologicalSpace.Opens.IsBasis
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ TopologicalSpace.Opens.IsBasis (Set.range basicOpen)

tactic: convert isTopologicalBasis_basic_opens (R := R)
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ TopologicalSpace.IsTopologicalBasis (SetLike.coe '' Set.range basicOpen)

tactic: rw [← Set.range_comp]
state_before: case h.e'_3
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ SetLike.coe '' Set.range basicOpen = Set.range fun r => ↑(basicOpen r)

tactic: rfl
state_before: case h.e'_3
R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
⊢ Set.range (SetLike.coe ∘ basicOpen) = Set.range fun r => ↑(basicOpen r)
Theorem: AlgebraicGeometry.SheafedSpace.congr_app
File: Mathlib/AlgebraicGeometry/SheafedSpace.lean

tactic: subst h
state_before: C : Type u
inst✝ : Category C
X Y : SheafedSpace C
α β : X ⟶ Y
h : α = β
U : (Opens ↑↑Y.toPresheafedSpace)ᵒᵖ
⊢ (Functor.op (Opens.map β.base)).obj U = (Functor.op (Opens.map α.base)).obj U

tactic: rfl
state_before: C : Type u
inst✝ : Category C
X Y : SheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y.toPresheafedSpace)ᵒᵖ
⊢ (Functor.op (Opens.map α.base)).obj U = (Functor.op (Opens.map α.base)).obj U