tasksource/leandojo huggingface dataset:
Theorem: DiscreteQuotient.map_id
File: Mathlib/Topology/DiscreteQuotient.lean

tactic: ext ⟨⟩
state_before: α : Type ?u.31713
X : Type u_1
Y : Type ?u.31719
Z : Type ?u.31722
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S : DiscreteQuotient X
f : C(X, Y)
A A' : DiscreteQuotient X
B B' : DiscreteQuotient Y
g : C(Y, Z)
C : DiscreteQuotient Z
⊢ map (ContinuousMap.id X) (_ : LEComap (ContinuousMap.id X) A A) = id

tactic: rfl
state_before: case h.mk
α : Type ?u.31713
X : Type u_1
Y : Type ?u.31719
Z : Type ?u.31722
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S : DiscreteQuotient X
f : C(X, Y)
A A' : DiscreteQuotient X
B B' : DiscreteQuotient Y
g : C(Y, Z)
C : DiscreteQuotient Z
x✝ : Quotient A.toSetoid
a✝ : X
⊢ map (ContinuousMap.id X) (_ : LEComap (ContinuousMap.id X) A A) (Quot.mk Setoid.r a✝) = id (Quot.mk Setoid.r a✝)
Theorem: Option.map_map₂_distrib_left
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> simp [h_distrib]
state_before: α : Type u_4
β : Type u_5
γ : Type u_3
f : α → β → γ
a : Option α
b : Option β
c : Option γ
δ : Type u_1
α' : Type u_2
g : γ → δ
f' : α' → β → δ
g' : α → α'
h_distrib : ∀ (a : α) (b : β), g (f a b) = f' (g' a) b
⊢ Option.map g (map₂ f a b) = map₂ f' (Option.map g' a) b
Theorem: neg_le_self_iff
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: simp [neg_le_iff_add_nonneg, ← two_mul, mul_nonneg_iff, zero_le_one, (zero_lt_two' α).not_le]
state_before: α : Type u
β : Type ?u.183910
inst✝ : LinearOrderedRing α
a b c : α
⊢ -a ≤ a ↔ 0 ≤ a
Theorem: setOf_isPreconnected_eq_of_ordered
File: Mathlib/Topology/Algebra/Order/IntermediateValue.lean

tactic: refine' Subset.antisymm setOf_isPreconnected_subset_of_ordered _
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : ConditionallyCompleteLinearOrder β
inst✝³ : TopologicalSpace β
inst✝² : OrderTopology β
inst✝¹ : Nonempty γ
inst✝ : DenselyOrdered α
a b : α
⊢ {s | IsPreconnected s} =
    range (uncurry Icc) ∪ range (uncurry Ico) ∪ range (uncurry Ioc) ∪ range (uncurry Ioo) ∪
      (range Ici ∪ range Ioi ∪ range Iic ∪ range Iio ∪ {univ, ∅})

tactic: simp only [subset_def, forall_range_iff, uncurry, or_imp, forall_and, mem_union,
  mem_setOf_eq, insert_eq, mem_singleton_iff, forall_eq, forall_true_iff, and_true_iff,
  isPreconnected_Icc, isPreconnected_Ico, isPreconnected_Ioc, isPreconnected_Ioo,
  isPreconnected_Ioi, isPreconnected_Iio, isPreconnected_Ici, isPreconnected_Iic,
  isPreconnected_univ, isPreconnected_empty]
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁷ : ConditionallyCompleteLinearOrder α
inst✝⁶ : TopologicalSpace α
inst✝⁵ : OrderTopology α
inst✝⁴ : ConditionallyCompleteLinearOrder β
inst✝³ : TopologicalSpace β
inst✝² : OrderTopology β
inst✝¹ : Nonempty γ
inst✝ : DenselyOrdered α
a b : α
⊢ range (uncurry Icc) ∪ range (uncurry Ico) ∪ range (uncurry Ioc) ∪ range (uncurry Ioo) ∪
      (range Ici ∪ range Ioi ∪ range Iic ∪ range Iio ∪ {univ, ∅}) ⊆
    {s | IsPreconnected s}
Theorem: NormedAddGroupHom.comp_range
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: erw [AddMonoidHom.map_range]
state_before: V : Type ?u.488713
W : Type ?u.488716
V₁ : Type u_2
V₂ : Type u_3
V₃ : Type u_1
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f : NormedAddGroupHom V₁ V₂
g : NormedAddGroupHom V₂ V₃
⊢ range (NormedAddGroupHom.comp g f) = AddSubgroup.map (toAddMonoidHom g) (range f)

tactic: rfl
state_before: V : Type ?u.488713
W : Type ?u.488716
V₁ : Type u_2
V₂ : Type u_3
V₃ : Type u_1
inst✝⁴ : SeminormedAddCommGroup V
inst✝³ : SeminormedAddCommGroup W
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f : NormedAddGroupHom V₁ V₂
g : NormedAddGroupHom V₂ V₃
⊢ range (NormedAddGroupHom.comp g f) = AddMonoidHom.range (AddMonoidHom.comp (toAddMonoidHom g) (toAddMonoidHom f))
Theorem: Qpf.comp_map
File: Mathlib/Data/QPF/Univariate/Basic.lean

tactic: rw [← abs_repr x]
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f : α → β
g : β → γ
x : F α
⊢ (g ∘ f) <$> x = g <$> f <$> x

tactic: cases' repr x with a f
state_before: F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f : α → β
g : β → γ
x : F α
⊢ (g ∘ f) <$> abs (repr x) = g <$> f <$> abs (repr x)

tactic: rw [← abs_map, ← abs_map, ← abs_map]
state_before: case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f✝ : α → β
g : β → γ
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ (g ∘ f✝) <$> abs { fst := a, snd := f } = g <$> f✝ <$> abs { fst := a, snd := f }

tactic: rfl
state_before: case mk
F : Type u → Type u
inst✝ : Functor F
q : Qpf F
α β γ : Type u
f✝ : α → β
g : β → γ
x : F α
a : (P F).A
f : PFunctor.B (P F) a → α
⊢ abs ((g ∘ f✝) <$> { fst := a, snd := f }) = abs (g <$> f✝ <$> { fst := a, snd := f })
Theorem: Int.normalize_of_nonneg
File: Mathlib/RingTheory/Int/Basic.lean

tactic: rw [normalize_apply, normUnit_eq, if_pos h, Units.val_one, mul_one]
state_before: z : ℤ
h : 0 ≤ z
⊢ ↑normalize z = z
Theorem: IsPrimitiveRoot.of_map_of_injective
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: apply_fun f
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
⊢ ζ ^ k = 1

tactic: rw [map_pow, _root_.map_one, h.pow_eq_one]
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
⊢ ↑f (ζ ^ k) = ↑f 1

tactic: rw [h.eq_orderOf]
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
⊢ ∀ (l : ℕ), ζ ^ l = 1 → k ∣ l

tactic: intro l hl
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
⊢ ∀ (l : ℕ), ζ ^ l = 1 → orderOf (↑f ζ) ∣ l

tactic: apply_fun f at hl
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
l : ℕ
hl : ζ ^ l = 1
⊢ orderOf (↑f ζ) ∣ l

tactic: rw [map_pow, _root_.map_one] at hl
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
l : ℕ
hl : ↑f (ζ ^ l) = ↑f 1
⊢ orderOf (↑f ζ) ∣ l

tactic: exact orderOf_dvd_of_pow_eq_one hl
state_before: M : Type u_2
N : Type u_3
G : Type ?u.2430067
R : Type ?u.2430070
S : Type ?u.2430073
F : Type u_1
inst✝³ : CommMonoid M
inst✝² : CommMonoid N
inst✝¹ : DivisionCommMonoid G
k l✝ : ℕ
ζ : M
f : F
h✝ : IsPrimitiveRoot ζ k
inst✝ : MonoidHomClass F M N
h : IsPrimitiveRoot (↑f ζ) k
hf : Injective ↑f
l : ℕ
hl : ↑f ζ ^ l = 1
⊢ orderOf (↑f ζ) ∣ l
Theorem: inf_eq_left
File: Mathlib/Order/Lattice.lean

tactic: simp [le_rfl]
state_before: α : Type u
β : Type v
inst✝ : SemilatticeInf α
a b c d : α
⊢ a ⊓ b ≤ a ∧ a ≤ a ⊓ b ↔ a ≤ b
Theorem: Sym.map_id
File: Mathlib/Data/Sym/Basic.lean

tactic: ext
state_before: α✝ : Type ?u.35910
β : Type ?u.35913
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_1
n : ℕ
s : Sym α n
⊢ map id s = s

tactic: simp [Sym.map]
state_before: case h
α✝ : Type ?u.35910
β : Type ?u.35913
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_1
n : ℕ
s : Sym α n
⊢ ↑(map id s) = ↑s

tactic: rfl
state_before: case h
α✝ : Type ?u.35910
β : Type ?u.35913
n✝ n' m : ℕ
s✝ : Sym α✝ n✝
a b : α✝
α : Type u_1
n : ℕ
s : Sym α n
⊢ { val := ↑s, property := (_ : (fun s => ↑Multiset.card s = n) ↑s) } = s
Theorem: one_div_one_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.25939
G : Type ?u.25942
inst✝ : DivisionMonoid α
a b c : α
⊢ 1 / (1 / a) = a
Theorem: Ordinal.lt_bsup
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa only [not_forall, not_le] using not_congr (@bsup_le_iff.{_, v} _ f a)
state_before: α : Type ?u.310682
β : Type ?u.310685
γ : Type ?u.310688
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
f : (a : Ordinal) → a < o → Ordinal
a : Ordinal
⊢ a < bsup o f ↔ ∃ i hi, a < f i hi
Theorem: List.foldlIdx_eq_foldl_enum
File: Mathlib/Data/List/Indexes.lean

tactic: simp only [foldlIdx, foldlIdxSpec, foldlIdx_eq_foldlIdxSpec, enum]
state_before: α : Type u
β : Type v
f : ℕ → α → β → α
a : α
bs : List β
⊢ foldlIdx f a bs = foldl (fun a p => f p.fst a p.snd) a (enum bs)
Theorem: TensorProduct.ext'
File: Mathlib/LinearAlgebra/TensorProduct.lean

tactic: simp_rw [LinearMap.map_zero]
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.601904
inst✝¹³ : Monoid R'
R'' : Type ?u.601910
inst✝¹² : Semiring R''
M : Type u_3
N : Type u_2
P : Type u_4
Q : Type ?u.601925
S : Type ?u.601928
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
f : M →ₗ[R] N →ₗ[R] P
g h : M ⊗[R] N →ₗ[R] P
H : ∀ (x : M) (y : N), ↑g (x ⊗ₜ[R] y) = ↑h (x ⊗ₜ[R] y)
z : M ⊗[R] N
⊢ ↑g 0 = ↑h 0

tactic: rw [g.map_add, h.map_add, ihx, ihy]
state_before: R : Type u_1
inst✝¹⁴ : CommSemiring R
R' : Type ?u.601904
inst✝¹³ : Monoid R'
R'' : Type ?u.601910
inst✝¹² : Semiring R''
M : Type u_3
N : Type u_2
P : Type u_4
Q : Type ?u.601925
S : Type ?u.601928
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid N
inst✝⁹ : AddCommMonoid P
inst✝⁸ : AddCommMonoid Q
inst✝⁷ : AddCommMonoid S
inst✝⁶ : Module R M
inst✝⁵ : Module R N
inst✝⁴ : Module R P
inst✝³ : Module R Q
inst✝² : Module R S
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
f : M →ₗ[R] N →ₗ[R] P
g h : M ⊗[R] N →ₗ[R] P
H : ∀ (x : M) (y : N), ↑g (x ⊗ₜ[R] y) = ↑h (x ⊗ₜ[R] y)
z x y : M ⊗[R] N
ihx : ↑g x = ↑h x
ihy : ↑g y = ↑h y
⊢ ↑g (x + y) = ↑h (x + y)
Theorem: Polynomial.erase_same
File: Mathlib/Data/Polynomial/Basic.lean

tactic: simp [coeff_erase]
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
⊢ coeff (erase n p) n = 0
Theorem: Nat.digitsAux_zero
File: Mathlib/Data/Nat/Digits.lean

tactic: rw [digitsAux]
state_before: n b : ℕ
h : 2 ≤ b
⊢ digitsAux b h 0 = []
Theorem: existsUnique_sub_zsmul_mem_Ico
File: Mathlib/Algebra/Order/Archimedean.lean

tactic: simpa only [mem_Ico, le_sub_iff_add_le, zero_add, add_comm c, sub_lt_iff_lt_add', add_assoc] using
  existsUnique_zsmul_near_of_pos' ha (b - c)
state_before: α : Type u_1
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : Archimedean α
a : α
ha : 0 < a
b c : α
⊢ ∃! m, b - m • a ∈ Ico c (c + a)
Theorem: MeasureTheory.Integrable.left_of_add_measure
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rw [← memℒp_one_iff_integrable] at h ⊢
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.840061
δ : Type ?u.840064
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → β
h : Integrable f
⊢ Integrable f

tactic: exact h.left_of_add_measure
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.840061
δ : Type ?u.840064
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f : α → β
h : Memℒp f 1
⊢ Memℒp f 1
Theorem: Finset.centerMass_filter_ne_zero
File: Mathlib/Analysis/Convex/Combination.lean

tactic: simpa only [hit, mem_filter, true_and_iff, Ne.def, Classical.not_not] using hit'
state_before: R : Type u_2
E : Type u_1
F : Type ?u.69758
ι : Type u_3
ι' : Type ?u.69764
α : Type ?u.69767
inst✝⁷ : LinearOrderedField R
inst✝⁶ : AddCommGroup E
inst✝⁵ : AddCommGroup F
inst✝⁴ : LinearOrderedAddCommGroup α
inst✝³ : Module R E
inst✝² : Module R F
inst✝¹ : Module R α
inst✝ : OrderedSMul R α
s : Set E
i✝ j : ι
c : R
t : Finset ι
w : ι → R
z : ι → E
i : ι
hit : i ∈ t
hit' : ¬i ∈ filter (fun i => w i ≠ 0) t
⊢ w i = 0
Theorem: Mon_.Mon_tensor_mul_one
File: Mathlib/CategoryTheory/Monoidal/Mon_.lean

tactic: rw [← Category.id_comp (𝟙 (M.X ⊗ N.X)), tensor_comp]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (𝟙 (M.X ⊗ N.X) ⊗ (λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one)) ≫ tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom

tactic: slice_lhs 2 3 => rw [← tensor_id, tensor_μ_natural]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ ((𝟙 (M.X ⊗ N.X) ⊗ (λ_ (𝟙_ C)).inv) ≫ (𝟙 (M.X ⊗ N.X) ⊗ M.one ⊗ N.one)) ≫
      tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom

tactic: slice_lhs 3 4 => rw [← tensor_comp, mul_one M, mul_one N]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (𝟙 (M.X ⊗ N.X) ⊗ (λ_ (𝟙_ C)).inv) ≫
      (tensor_μ C (M.X, N.X) (tensorUnit', 𝟙_ C) ≫ ((𝟙 M.X ⊗ M.one) ⊗ 𝟙 N.X ⊗ N.one)) ≫ (M.mul ⊗ N.mul) =
    (ρ_ (M.X ⊗ N.X)).hom

tactic: symm
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (𝟙 (M.X ⊗ N.X) ⊗ (λ_ (𝟙_ C)).inv) ≫ tensor_μ C (M.X, N.X) (tensorUnit', 𝟙_ C) ≫ ((ρ_ M.X).hom ⊗ (ρ_ N.X).hom) =
    (ρ_ (M.X ⊗ N.X)).hom

tactic: exact tensor_right_unitality C M.X N.X
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (ρ_ (M.X ⊗ N.X)).hom =
    (𝟙 (M.X ⊗ N.X) ⊗ (λ_ (𝟙_ C)).inv) ≫ tensor_μ C (M.X, N.X) (tensorUnit', 𝟙_ C) ≫ ((ρ_ M.X).hom ⊗ (ρ_ N.X).hom)
Theorem: Sigma.lex_swap
File: Mathlib/Data/Sigma/Lex.lean

tactic: rintro (⟨a, b, h⟩ | ⟨a, b, h⟩)
state_before: case mpr
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
a b : (i : ι) × α i
⊢ Lex r (fun i => Function.swap (s i)) b a → Lex (Function.swap r) s a b

tactic: exacts [Lex.left _ _ h, Lex.right _ _ h]
state_before: case mpr.left
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
i✝ j✝ : ι
a : α i✝
b : α j✝
h : r i✝ j✝
⊢ Lex (Function.swap r) s { fst := j✝, snd := b } { fst := i✝, snd := a }

case mpr.right
ι : Type u_1
α : ι → Type u_2
r r₁ r₂ : ι → ι → Prop
s s₁ s₂ : (i : ι) → α i → α i → Prop
i✝ : ι
a b : α i✝
h : Function.swap (s i✝) a b
⊢ Lex (Function.swap r) s { fst := i✝, snd := b } { fst := i✝, snd := a }
Theorem: Equiv.hasSum_iff_of_support
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: have : (g ∘ (↑)) ∘ e = f ∘ (↑) := funext he
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.59444
inst✝¹ : AddCommMonoid α
inst✝ : TopologicalSpace α
f g✝ : β → α
a b : α
s : Finset β
g : γ → α
e : ↑(support f) ≃ ↑(support g)
he : ∀ (x : ↑(support f)), g ↑(↑e x) = f ↑x
⊢ HasSum f a ↔ HasSum g a

tactic: rw [← hasSum_subtype_support, ← this, e.hasSum_iff, hasSum_subtype_support]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.59444
inst✝¹ : AddCommMonoid α
inst✝ : TopologicalSpace α
f g✝ : β → α
a b : α
s : Finset β
g : γ → α
e : ↑(support f) ≃ ↑(support g)
he : ∀ (x : ↑(support f)), g ↑(↑e x) = f ↑x
this : (g ∘ Subtype.val) ∘ ↑e = f ∘ Subtype.val
⊢ HasSum f a ↔ HasSum g a
Theorem: List.isRotated_cyclicPermutations_iff
File: Mathlib/Data/List/Rotate.lean

tactic: by_cases hl : l = []
state_before: α : Type u
l✝ l'✝ l l' : List α
⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'

tactic: have hl' : l.cyclicPermutations.length = l.length := length_cyclicPermutations_of_ne_nil _ hl
state_before: case neg
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'

tactic: refine' ⟨fun h => _, IsRotated.cyclicPermutations⟩
state_before: case neg
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
hl' : length (cyclicPermutations l) = length l
⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'

tactic: obtain ⟨k, hk⟩ := h
state_before: case neg
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
hl' : length (cyclicPermutations l) = length l
h : cyclicPermutations l ~r cyclicPermutations l'
⊢ l ~r l'

tactic: refine' ⟨k % l.length, _⟩
state_before: case neg.intro
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
hl' : length (cyclicPermutations l) = length l
k : ℕ
hk : rotate (cyclicPermutations l) k = cyclicPermutations l'
⊢ l ~r l'

tactic: have hk' : k % l.length < l.length := mod_lt _ (length_pos_of_ne_nil hl)
state_before: case neg.intro
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
hl' : length (cyclicPermutations l) = length l
k : ℕ
hk : rotate (cyclicPermutations l) k = cyclicPermutations l'
⊢ rotate l (k % length l) = l'

tactic: rw [← nthLe_cyclicPermutations _ _ (hk'.trans_le hl'.ge), ← nthLe_rotate' _ k]
state_before: case neg.intro
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
hl' : length (cyclicPermutations l) = length l
k : ℕ
hk : rotate (cyclicPermutations l) k = cyclicPermutations l'
hk' : k % length l < length l
⊢ rotate l (k % length l) = l'

tactic: simp [hk, hl', tsub_add_cancel_of_le hk'.le]
state_before: case neg.intro
α : Type u
l✝ l'✝ l l' : List α
hl : ¬l = []
hl' : length (cyclicPermutations l) = length l
k : ℕ
hk : rotate (cyclicPermutations l) k = cyclicPermutations l'
hk' : k % length l < length l
⊢ nthLe (rotate (cyclicPermutations l) k)
      ((length (cyclicPermutations l) - k % length (cyclicPermutations l) + k % length l) %
        length (cyclicPermutations l))
      (_ :
        (length (cyclicPermutations l) - k % length (cyclicPermutations l) + k % length l) %
            length (cyclicPermutations l) <
          length (rotate (cyclicPermutations l) k)) =
    l'

tactic: simp [hl, eq_comm]
state_before: case pos
α : Type u
l✝ l'✝ l l' : List α
hl : l = []
⊢ cyclicPermutations l ~r cyclicPermutations l' ↔ l ~r l'
Theorem: Ordinal.zero_opow'
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: simp only [opow_def, if_true]
state_before: a : Ordinal
⊢ 0 ^ a = 1 - a
Theorem: Multiset.coe_eq_singleton
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [← coe_singleton, coe_eq_coe, List.perm_singleton]
state_before: α : Type u_1
β : Type ?u.25696
γ : Type ?u.25699
l : List α
a : α
⊢ ↑l = {a} ↔ l = [a]
Theorem: List.indexOf_cons_ne
File: Mathlib/Data/List/Basic.lean

tactic: simp only [indexOf, findIdx_cons, Bool.cond_eq_ite, beq_iff_eq, h, ite_false]
state_before: ι : Type ?u.78062
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
inst✝ : DecidableEq α
a b : α
l : List α
x✝ : a ≠ b
h : a ≠ b := x✝
⊢ indexOf a (b :: l) = succ (indexOf a l)
Theorem: Cardinal.mul_eq_max_of_aleph0_le_right
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [mul_comm, max_comm]
state_before: a b : Cardinal
h' : a ≠ 0
h : ℵ₀ ≤ b
⊢ a * b = max a b

tactic: exact mul_eq_max_of_aleph0_le_left h h'
state_before: a b : Cardinal
h' : a ≠ 0
h : ℵ₀ ≤ b
⊢ b * a = max b a
Theorem: Convex.combo_closure_interior_subset_interior
File: Mathlib/Analysis/Convex/Topology.lean

tactic: rw [add_comm]
state_before: ι : Type ?u.64470
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
a b : 𝕜
ha : 0 ≤ a
hb : 0 < b
hab : a + b = 1
⊢ a • closure s + b • interior s ⊆ interior s

tactic: exact hs.combo_interior_closure_subset_interior hb ha (add_comm a b ▸ hab)
state_before: ι : Type ?u.64470
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
a b : 𝕜
ha : 0 ≤ a
hb : 0 < b
hab : a + b = 1
⊢ b • interior s + a • closure s ⊆ interior s
Theorem: Part.Dom.bind
File: Mathlib/Data/Part.lean

tactic: ext b
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.20498
o : Part α
h : o.Dom
f : α → Part β
⊢ Part.bind o f = f (get o h)

tactic: simp only [Part.mem_bind_iff, exists_prop]
state_before: case H
α : Type u_1
β : Type u_2
γ : Type ?u.20498
o : Part α
h : o.Dom
f : α → Part β
b : β
⊢ b ∈ Part.bind o f ↔ b ∈ f (get o h)

tactic: refine' ⟨_, fun hb => ⟨o.get h, Part.get_mem _, hb⟩⟩
state_before: case H
α : Type u_1
β : Type u_2
γ : Type ?u.20498
o : Part α
h : o.Dom
f : α → Part β
b : β
⊢ (∃ a, a ∈ o ∧ b ∈ f a) ↔ b ∈ f (get o h)

tactic: rintro ⟨a, ha, hb⟩
state_before: case H
α : Type u_1
β : Type u_2
γ : Type ?u.20498
o : Part α
h : o.Dom
f : α → Part β
b : β
⊢ (∃ a, a ∈ o ∧ b ∈ f a) → b ∈ f (get o h)

tactic: rwa [Part.get_eq_of_mem ha]
state_before: case H.intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.20498
o : Part α
h : o.Dom
f : α → Part β
b : β
a : α
ha : a ∈ o
hb : b ∈ f a
⊢ b ∈ f (get o h)
Theorem: summable_norm_sum_mul_antidiagonal_of_summable_norm
File: Mathlib/Analysis/Normed/Field/InfiniteSum.lean

tactic: have :=
  summable_sum_mul_antidiagonal_of_summable_mul
    (Summable.mul_of_nonneg hf hg (fun _ => norm_nonneg _) fun _ => norm_nonneg _)
state_before: R : Type u_1
ι : Type ?u.5264
ι' : Type ?u.5267
inst✝ : NormedRing R
f g : ℕ → R
hf : Summable fun x => ‖f x‖
hg : Summable fun x => ‖g x‖
⊢ Summable fun n => ‖∑ kl in antidiagonal n, f kl.fst * g kl.snd‖

tactic: refine' summable_of_nonneg_of_le (fun _ => norm_nonneg _) _ this
state_before: R : Type u_1
ι : Type ?u.5264
ι' : Type ?u.5267
inst✝ : NormedRing R
f g : ℕ → R
hf : Summable fun x => ‖f x‖
hg : Summable fun x => ‖g x‖
this : Summable fun n => ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖
⊢ Summable fun n => ‖∑ kl in antidiagonal n, f kl.fst * g kl.snd‖

tactic: intro n
state_before: R : Type u_1
ι : Type ?u.5264
ι' : Type ?u.5267
inst✝ : NormedRing R
f g : ℕ → R
hf : Summable fun x => ‖f x‖
hg : Summable fun x => ‖g x‖
this : Summable fun n => ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖
⊢ ∀ (b : ℕ), ‖∑ kl in antidiagonal b, f kl.fst * g kl.snd‖ ≤ ∑ kl in antidiagonal b, ‖f kl.fst‖ * ‖g kl.snd‖

tactic: calc
  ‖∑ kl in antidiagonal n, f kl.1 * g kl.2‖ ≤ ∑ kl in antidiagonal n, ‖f kl.1 * g kl.2‖ :=
    norm_sum_le _ _
  _ ≤ ∑ kl in antidiagonal n, ‖f kl.1‖ * ‖g kl.2‖ := by gcongr; apply norm_mul_le
state_before: R : Type u_1
ι : Type ?u.5264
ι' : Type ?u.5267
inst✝ : NormedRing R
f g : ℕ → R
hf : Summable fun x => ‖f x‖
hg : Summable fun x => ‖g x‖
this : Summable fun n => ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖
n : ℕ
⊢ ‖∑ kl in antidiagonal n, f kl.fst * g kl.snd‖ ≤ ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖

tactic: gcongr
state_before: R : Type u_1
ι : Type ?u.5264
ι' : Type ?u.5267
inst✝ : NormedRing R
f g : ℕ → R
hf : Summable fun x => ‖f x‖
hg : Summable fun x => ‖g x‖
this : Summable fun n => ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖
n : ℕ
⊢ ∑ kl in antidiagonal n, ‖f kl.fst * g kl.snd‖ ≤ ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖

tactic: apply norm_mul_le
state_before: case h
R : Type u_1
ι : Type ?u.5264
ι' : Type ?u.5267
inst✝ : NormedRing R
f g : ℕ → R
hf : Summable fun x => ‖f x‖
hg : Summable fun x => ‖g x‖
this : Summable fun n => ∑ kl in antidiagonal n, ‖f kl.fst‖ * ‖g kl.snd‖
n : ℕ
i✝ : ℕ × ℕ
a✝ : i✝ ∈ antidiagonal n
⊢ ‖f i✝.fst * g i✝.snd‖ ≤ ‖f i✝.fst‖ * ‖g i✝.snd‖