Skip to content

Commit

Permalink
bump to nightly-2023-08-21-09
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-bot committed Aug 21, 2023
1 parent 4e8c467 commit fa4c212
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 88 deletions.
4 changes: 0 additions & 4 deletions Mathbin/Algebra/Ring/Equiv.lean
Expand Up @@ -1047,7 +1047,6 @@ theorem symm_trans_self (e : R ≃+* S) : e.symm.trans e = RingEquiv.refl S :=
#align ring_equiv.symm_trans_self RingEquiv.symm_trans_self
-/

#print RingEquiv.noZeroDivisors /-
/-- If two rings are isomorphic, and the second doesn't have zero divisors,
then so does the first. -/
protected theorem noZeroDivisors {A : Type _} (B : Type _) [Ring A] [Ring B] [NoZeroDivisors B]
Expand All @@ -1058,9 +1057,7 @@ protected theorem noZeroDivisors {A : Type _} (B : Type _) [Ring A] [Ring B] [No
have : e x * e y = 0 := by rw [← e.map_mul, hxy, e.map_zero]
simpa using eq_zero_or_eq_zero_of_mul_eq_zero this }
#align ring_equiv.no_zero_divisors RingEquiv.noZeroDivisors
-/

#print RingEquiv.isDomain /-
/-- If two rings are isomorphic, and the second is a domain, then so is the first. -/
protected theorem isDomain {A : Type _} (B : Type _) [Ring A] [Ring B] [IsDomain B] (e : A ≃+* B) :
IsDomain A :=
Expand All @@ -1069,7 +1066,6 @@ protected theorem isDomain {A : Type _} (B : Type _) [Ring A] [Ring B] [IsDomain
haveI := e.no_zero_divisors B
exact NoZeroDivisors.to_isDomain _
#align ring_equiv.is_domain RingEquiv.isDomain
-/

end RingEquiv

Expand Down
16 changes: 4 additions & 12 deletions Mathbin/Analysis/NormedSpace/OperatorNorm.lean
Expand Up @@ -1362,7 +1362,6 @@ section Unital

variable (π•œ) (π•œ' : Type _) [SeminormedRing π•œ'] [NormedAlgebra π•œ π•œ'] [NormOneClass π•œ']

#print ContinuousLinearMap.mulβ‚—α΅’ /-
/-- Multiplication in a normed algebra as a linear isometry to the space of
continuous linear maps. -/
def mulβ‚—α΅’ : π•œ' β†’β‚—α΅’[π•œ] π•œ' β†’L[π•œ] π•œ' where
Expand All @@ -1372,22 +1371,17 @@ def mulβ‚—α΅’ : π•œ' β†’β‚—α΅’[π•œ] π•œ' β†’L[π•œ] π•œ' where
(by
convert ratio_le_op_norm _ (1 : π•œ'); simp [norm_one]
infer_instance)
#align continuous_linear_map.mulβ‚—α΅’ ContinuousLinearMap.mulβ‚—α΅’
-/
#align continuous_linear_map.mulβ‚—α΅’ ContinuousLinearMap.mulβ‚—α΅’β‚“

#print ContinuousLinearMap.coe_mulβ‚—α΅’ /-
@[simp]
theorem coe_mulβ‚—α΅’ : ⇑(mulβ‚—α΅’ π•œ π•œ') = mul π•œ π•œ' :=
rfl
#align continuous_linear_map.coe_mulβ‚—α΅’ ContinuousLinearMap.coe_mulβ‚—α΅’
-/
#align continuous_linear_map.coe_mulβ‚—α΅’ ContinuousLinearMap.coe_mulβ‚—α΅’β‚“

#print ContinuousLinearMap.op_norm_mul_apply /-
@[simp]
theorem op_norm_mul_apply (x : π•œ') : β€–mul π•œ π•œ' xβ€– = β€–xβ€– :=
(mulβ‚—α΅’ π•œ π•œ').norm_map x
#align continuous_linear_map.op_norm_mul_apply ContinuousLinearMap.op_norm_mul_apply
-/
#align continuous_linear_map.op_norm_mul_apply ContinuousLinearMap.op_norm_mul_applyβ‚“

end Unital

Expand Down Expand Up @@ -2203,13 +2197,11 @@ section

variable [NormedRing π•œ'] [NormedAlgebra π•œ π•œ']

#print ContinuousLinearMap.op_norm_mul /-
@[simp]
theorem op_norm_mul [NormOneClass π•œ'] : β€–mul π•œ π•œ'β€– = 1 :=
haveI := NormOneClass.nontrivial π•œ'
(mulβ‚—α΅’ π•œ π•œ').norm_toContinuousLinearMap
#align continuous_linear_map.op_norm_mul ContinuousLinearMap.op_norm_mul
-/
#align continuous_linear_map.op_norm_mul ContinuousLinearMap.op_norm_mulβ‚“

end

Expand Down
4 changes: 1 addition & 3 deletions Mathbin/Data/Pi/Lex.lean
Expand Up @@ -255,15 +255,13 @@ instance Lex.orderedCommGroup [LinearOrder ΞΉ] [βˆ€ a, OrderedCommGroup (Ξ² a)]
#align pi.lex.ordered_add_comm_group Pi.Lex.orderedAddCommGroup
-/

#print Pi.lex_desc /-
/-- If we swap two strictly decreasing values in a function, then the result is lexicographically
smaller than the original function. -/
theorem lex_desc {Ξ±} [Preorder ΞΉ] [DecidableEq ΞΉ] [Preorder Ξ±] {f : ΞΉ β†’ Ξ±} {i j : ΞΉ} (h₁ : i < j)
(hβ‚‚ : f j < f i) : toLex (f ∘ Equiv.swap i j) < toLex f :=
⟨i, fun k hik => congr_arg f (Equiv.swap_apply_of_ne_of_ne hik.Ne (hik.trans h₁).Ne), by
simpa only [Pi.toLex_apply, Function.comp_apply, Equiv.swap_apply_left] using hβ‚‚βŸ©
#align pi.lex_desc Pi.lex_desc
-/
#align pi.lex_desc Pi.lex_descβ‚“

end Pi

64 changes: 32 additions & 32 deletions Mathbin/Data/Sum/Basic.lean
Expand Up @@ -80,22 +80,22 @@ theorem inr_injective : Function.Injective (inr : Ξ² β†’ Sum Ξ± Ξ²) := fun x y =

section get

#print Sum.getLeft /-
#print Sum.getLeft? /-
/-- Check if a sum is `inl` and if so, retrieve its contents. -/
@[simp]
def getLeft : Sum Ξ± Ξ² β†’ Option Ξ±
def getLeft? : Sum Ξ± Ξ² β†’ Option Ξ±
| inl a => some a
| inr _ => none
#align sum.get_left Sum.getLeft
#align sum.get_left Sum.getLeft?
-/

#print Sum.getRight /-
#print Sum.getRight? /-
/-- Check if a sum is `inr` and if so, retrieve its contents. -/
@[simp]
def getRight : Sum Ξ± Ξ² β†’ Option Ξ²
def getRight? : Sum Ξ± Ξ² β†’ Option Ξ²
| inr b => some b
| inl _ => none
#align sum.get_right Sum.getRight
#align sum.get_right Sum.getRight?
-/

#print Sum.isLeft /-
Expand All @@ -118,34 +118,34 @@ def isRight : Sum Ξ± Ξ² β†’ Bool

variable {x y : Sum Ξ± Ξ²}

#print Sum.getLeft_eq_none_iff /-
#print Sum.getLeft?_eq_none_iff /-
@[simp]
theorem getLeft_eq_none_iff : x.getLeft = none ↔ x.isRight := by
theorem getLeft?_eq_none_iff : x.getLeft? = none ↔ x.isRight := by
cases x <;>
simp only [get_left, is_right, Bool.coe_sort_true, Bool.coe_sort_false, eq_self_iff_true]
#align sum.get_left_eq_none_iff Sum.getLeft_eq_none_iff
#align sum.get_left_eq_none_iff Sum.getLeft?_eq_none_iff
-/

#print Sum.getRight_eq_none_iff /-
#print Sum.getRight?_eq_none_iff /-
@[simp]
theorem getRight_eq_none_iff : x.getRight = none ↔ x.isLeft := by
theorem getRight?_eq_none_iff : x.getRight? = none ↔ x.isLeft := by
cases x <;>
simp only [get_right, is_left, Bool.coe_sort_true, Bool.coe_sort_false, eq_self_iff_true]
#align sum.get_right_eq_none_iff Sum.getRight_eq_none_iff
#align sum.get_right_eq_none_iff Sum.getRight?_eq_none_iff
-/

#print Sum.getLeft_eq_some_iff /-
#print Sum.getLeft?_eq_some_iff /-
@[simp]
theorem getLeft_eq_some_iff {a} : x.getLeft = some a ↔ x = inl a := by
theorem getLeft?_eq_some_iff {a} : x.getLeft? = some a ↔ x = inl a := by
cases x <;> simp only [get_left]
#align sum.get_left_eq_some_iff Sum.getLeft_eq_some_iff
#align sum.get_left_eq_some_iff Sum.getLeft?_eq_some_iff
-/

#print Sum.getRight_eq_some_iff /-
#print Sum.getRight?_eq_some_iff /-
@[simp]
theorem getRight_eq_some_iff {b} : x.getRight = some b ↔ x = inr b := by
theorem getRight?_eq_some_iff {b} : x.getRight? = some b ↔ x = inr b := by
cases x <;> simp only [get_right]
#align sum.get_right_eq_some_iff Sum.getRight_eq_some_iff
#align sum.get_right_eq_some_iff Sum.getRight?_eq_some_iff
-/

#print Sum.not_isLeft /-
Expand Down Expand Up @@ -346,18 +346,18 @@ theorem isRight_map (f : Ξ± β†’ Ξ²) (g : Ξ³ β†’ Ξ΄) (x : Sum Ξ± Ξ³) : isRight (x
#align sum.is_right_map Sum.isRight_map
-/

#print Sum.getLeft_map /-
#print Sum.getLeft?_map /-
@[simp]
theorem getLeft_map (f : Ξ± β†’ Ξ²) (g : Ξ³ β†’ Ξ΄) (x : Sum Ξ± Ξ³) : (x.map f g).getLeft = x.getLeft.map f :=
by cases x <;> rfl
#align sum.get_left_map Sum.getLeft_map
theorem getLeft?_map (f : Ξ± β†’ Ξ²) (g : Ξ³ β†’ Ξ΄) (x : Sum Ξ± Ξ³) :
(x.map f g).getLeft? = x.getLeft?.map f := by cases x <;> rfl
#align sum.get_left_map Sum.getLeft?_map
-/

#print Sum.getRight_map /-
#print Sum.getRight?_map /-
@[simp]
theorem getRight_map (f : Ξ± β†’ Ξ²) (g : Ξ³ β†’ Ξ΄) (x : Sum Ξ± Ξ³) :
(x.map f g).getRight = x.getRight.map g := by cases x <;> rfl
#align sum.get_right_map Sum.getRight_map
theorem getRight?_map (f : Ξ± β†’ Ξ²) (g : Ξ³ β†’ Ξ΄) (x : Sum Ξ± Ξ³) :
(x.map f g).getRight? = x.getRight?.map g := by cases x <;> rfl
#align sum.get_right_map Sum.getRight?_map
-/

open Function (update update_eq_iff update_comp_eq_of_injective update_comp_eq_of_forall_ne)
Expand Down Expand Up @@ -500,16 +500,16 @@ theorem isRight_swap (x : Sum Ξ± Ξ²) : x.symm.isRight = x.isLeft := by cases x <
#align sum.is_right_swap Sum.isRight_swap
-/

#print Sum.getLeft_swap /-
#print Sum.getLeft?_swap /-
@[simp]
theorem getLeft_swap (x : Sum Ξ± Ξ²) : x.symm.getLeft = x.getRight := by cases x <;> rfl
#align sum.get_left_swap Sum.getLeft_swap
theorem getLeft?_swap (x : Sum Ξ± Ξ²) : x.symm.getLeft? = x.getRight? := by cases x <;> rfl
#align sum.get_left_swap Sum.getLeft?_swap
-/

#print Sum.getRight_swap /-
#print Sum.getRight?_swap /-
@[simp]
theorem getRight_swap (x : Sum Ξ± Ξ²) : x.symm.getRight = x.getLeft := by cases x <;> rfl
#align sum.get_right_swap Sum.getRight_swap
theorem getRight?_swap (x : Sum Ξ± Ξ²) : x.symm.getRight? = x.getLeft? := by cases x <;> rfl
#align sum.get_right_swap Sum.getRight?_swap
-/

section LiftRel
Expand Down
8 changes: 4 additions & 4 deletions Mathbin/LinearAlgebra/Finrank.lean
Expand Up @@ -91,15 +91,15 @@ theorem finrank_lt_of_rank_lt {n : β„•} (h : Module.rank K V < ↑n) : finrank K
#align finite_dimensional.finrank_lt_of_rank_lt FiniteDimensional.finrank_lt_of_rank_lt
-/

#print FiniteDimensional.rank_lt_of_finrank_lt /-
theorem rank_lt_of_finrank_lt {n : β„•} (h : n < finrank K V) : ↑n < Module.rank K V :=
#print FiniteDimensional.lt_rank_of_lt_finrank /-
theorem lt_rank_of_lt_finrank {n : β„•} (h : n < finrank K V) : ↑n < Module.rank K V :=
by
rwa [← Cardinal.toNat_lt_iff_lt_of_lt_aleph0, to_nat_cast]
Β· exact nat_lt_aleph_0 n
Β· contrapose! h
rw [finrank, Cardinal.toNat_apply_of_aleph0_le h]
exact n.zero_le
#align finite_dimensional.rank_lt_of_finrank_lt FiniteDimensional.rank_lt_of_finrank_lt
#align finite_dimensional.rank_lt_of_finrank_lt FiniteDimensional.lt_rank_of_lt_finrank
-/

#print FiniteDimensional.finrank_le_finrank_of_rank_le_rank /-
Expand All @@ -117,7 +117,7 @@ variable [Nontrivial K] [NoZeroSMulDivisors K V]
#print FiniteDimensional.nontrivial_of_finrank_pos /-
/-- A finite dimensional space is nontrivial if it has positive `finrank`. -/
theorem nontrivial_of_finrank_pos (h : 0 < finrank K V) : Nontrivial V :=
rank_pos_iff_nontrivial.mp (rank_lt_of_finrank_lt h)
rank_pos_iff_nontrivial.mp (lt_rank_of_lt_finrank h)
#align finite_dimensional.nontrivial_of_finrank_pos FiniteDimensional.nontrivial_of_finrank_pos
-/

Expand Down
6 changes: 3 additions & 3 deletions Mathbin/ModelTheory/Encoding.lean
Expand Up @@ -264,7 +264,7 @@ def listDecode :
simp only [List.sizeof, ← add_assoc]
exact le_max_of_le_right le_add_self⟩
| Sum.inr (Sum.inl ⟨n, R⟩)::Sum.inr (Sum.inr k)::l =>
⟨if h : βˆ€ i : Fin n, ((l.map Sum.getLeft).get? i).join.isSome then
⟨if h : βˆ€ i : Fin n, ((l.map Sum.getLeft?).get? i).join.isSome then
if h' : βˆ€ i, (Option.get (h i)).1 = k then
⟨k, BoundedFormula.rel R fun i => Eq.mp (by rw [h' i]) (Option.get (h i)).2⟩
else default
Expand Down Expand Up @@ -314,7 +314,7 @@ theorem listDecode_encode_list (l : List (Ξ£ n, L.BoundedFormula Ξ± n)) :
Β· rw [list_encode, cons_append, cons_append, singleton_append, cons_append, list_decode]
Β· have h :
βˆ€ i : Fin Ο†_l,
((List.map Sum.getLeft
((List.map Sum.getLeft?
(List.map
(fun i : Fin Ο†_l =>
Sum.inl
Expand All @@ -331,7 +331,7 @@ theorem listDecode_encode_list (l : List (Ξ£ n, L.BoundedFormula Ξ± n)) :
refine' ⟨lt_of_lt_of_le i.2 le_self_add, _⟩
rw [nth_le_append, nth_le_map]
Β·
simp only [Sum.getLeft, nth_le_fin_range, Fin.eta, Function.comp_apply,
simp only [Sum.getLeft?, nth_le_fin_range, Fin.eta, Function.comp_apply,
eq_self_iff_true, heq_iff_eq, and_self_iff]
Β· exact lt_of_lt_of_le i.is_lt (ge_of_eq (length_fin_range _))
Β· rw [length_map, length_fin_range]
Expand Down
18 changes: 4 additions & 14 deletions Mathbin/NumberTheory/NumberField/CanonicalEmbedding.lean
Expand Up @@ -45,28 +45,24 @@ scoped[CanonicalEmbedding]
notation "E" =>
({ w : InfinitePlace K // IsReal w } β†’ ℝ) Γ— ({ w : InfinitePlace K // IsComplex w } β†’ β„‚)

#print NumberField.canonicalEmbedding.space_rank /-
theorem space_rank [NumberField K] : finrank ℝ E = finrank β„š K :=
by
haveI : Module.Free ℝ β„‚ := inferInstance
rw [finrank_prod, finrank_pi, finrank_pi_fintype, Complex.finrank_real_complex, Finset.sum_const,
Finset.card_univ, ← card_real_embeddings, Algebra.id.smul_eq_mul, mul_comm, ←
card_complex_embeddings, ← NumberField.Embeddings.card K β„‚, Fintype.card_subtype_compl,
Nat.add_sub_of_le (Fintype.card_subtype_le _)]
#align number_field.canonical_embedding.space_rank NumberField.canonicalEmbedding.space_rank
-/
#align number_field.canonical_embedding.space_rank NumberField.CanonicalEmbedding.space_rank

#print NumberField.canonicalEmbedding.nontrivial_space /-
theorem nontrivial_space [NumberField K] : Nontrivial E :=
theorem non_trivial_space [NumberField K] : Nontrivial E :=
by
obtain ⟨w⟩ := infinite_place.nonempty K
obtain hw | hw := w.is_real_or_is_complex
· haveI : Nonempty { w : infinite_place K // is_real w } := ⟨⟨w, hw⟩⟩
exact nontrivial_prod_left
· haveI : Nonempty { w : infinite_place K // is_complex w } := ⟨⟨w, hw⟩⟩
exact nontrivial_prod_right
#align number_field.canonical_embedding.non_trivial_space NumberField.canonicalEmbedding.nontrivial_space
-/
#align number_field.canonical_embedding.non_trivial_space NumberField.CanonicalEmbedding.non_trivial_space

#print NumberField.canonicalEmbedding /-
/-- The canonical embedding of a number field `K` of signature `(r₁, rβ‚‚)` into `ℝ^r₁ Γ— β„‚^rβ‚‚`. -/
Expand All @@ -78,29 +74,25 @@ def NumberField.canonicalEmbedding : K β†’+* E :=
#print NumberField.canonicalEmbedding_injective /-
theorem NumberField.canonicalEmbedding_injective [NumberField K] :
Injective (NumberField.canonicalEmbedding K) :=
@RingHom.injective _ _ _ _ (nontrivial_space K) _
@RingHom.injective _ _ _ _ (non_trivial_space K) _
#align number_field.canonical_embedding_injective NumberField.canonicalEmbedding_injective
-/

open NumberField

variable {K}

#print NumberField.canonicalEmbedding.apply_at_real_infinitePlace /-
@[simp]
theorem apply_at_real_infinitePlace (w : { w : InfinitePlace K // IsReal w }) (x : K) :
(NumberField.canonicalEmbedding K x).1 w = w.Prop.Embedding x := by
simp only [canonical_embedding, RingHom.prod_apply, Pi.ringHom_apply]
#align number_field.canonical_embedding.apply_at_real_infinite_place NumberField.canonicalEmbedding.apply_at_real_infinitePlace
-/

#print NumberField.canonicalEmbedding.apply_at_complex_infinitePlace /-
@[simp]
theorem apply_at_complex_infinitePlace (w : { w : InfinitePlace K // IsComplex w }) (x : K) :
(NumberField.canonicalEmbedding K x).2 w = Embedding w.val x := by
simp only [canonical_embedding, RingHom.prod_apply, Pi.ringHom_apply]
#align number_field.canonical_embedding.apply_at_complex_infinite_place NumberField.canonicalEmbedding.apply_at_complex_infinitePlace
-/

#print NumberField.canonicalEmbedding.nnnorm_eq /-
theorem nnnorm_eq [NumberField K] (x : K) :
Expand Down Expand Up @@ -157,7 +149,6 @@ def integerLattice : Subring E :=
#align number_field.canonical_embedding.integer_lattice NumberField.canonicalEmbedding.integerLattice
-/

#print NumberField.canonicalEmbedding.equivIntegerLattice /-
/-- The linear equiv between `π“ž K` and the integer lattice. -/
def equivIntegerLattice [NumberField K] : π“ž K ≃ₗ[β„€] integerLattice K :=
LinearEquiv.ofBijective
Expand All @@ -171,7 +162,6 @@ def equivIntegerLattice [NumberField K] : π“ž K ≃ₗ[β„€] integerLattice K :=
rw [LinearMap.coe_mk, Subtype.mk_eq_mk] at h
exact IsFractionRing.injective (π“ž K) K (canonical_embedding_injective K h))
#align number_field.canonical_embedding.equiv_integer_lattice NumberField.canonicalEmbedding.equivIntegerLattice
-/

#print NumberField.canonicalEmbedding.integerLattice.inter_ball_finite /-
theorem integerLattice.inter_ball_finite [NumberField K] (r : ℝ) :
Expand Down
2 changes: 1 addition & 1 deletion Mathbin/Tactic/FreshNames.lean
Expand Up @@ -139,7 +139,7 @@ unsafe def rename_fresh (renames : name_map (Sum Name (List Name))) (reserved :
match renames.find h.local_uniq_name with
| none => Sum.inl h.local_pp_name
| some new_names => new_names
let reserved := reserved.insert_list <| renames.filterMap Sum.getLeft
let reserved := reserved.insert_list <| renames.filterMap Sum.getLeft?
let new_hyps ← intro_lst_fresh_reserved renames reserved
pure <| reverted new_hyps
#align tactic.rename_fresh tactic.rename_fresh
Expand Down

0 comments on commit fa4c212

Please sign in to comment.