Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Nov 12, 2024
2 parents 361d055 + 4023a18 commit 4332bcd
Show file tree
Hide file tree
Showing 302 changed files with 7,928 additions and 4,846 deletions.
79 changes: 0 additions & 79 deletions .github/workflows/maintainer_merge_comment.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/maintainer_merge_review.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/maintainer_merge_review_comment.yml

This file was deleted.

39 changes: 35 additions & 4 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ import Mathlib.Algebra.Field.MinimalAxioms
import Mathlib.Algebra.Field.Opposite
import Mathlib.Algebra.Field.Power
import Mathlib.Algebra.Field.Rat
import Mathlib.Algebra.Field.Subfield
import Mathlib.Algebra.Field.Subfield.Basic
import Mathlib.Algebra.Field.Subfield.Defs
import Mathlib.Algebra.Field.ULift
import Mathlib.Algebra.Free
import Mathlib.Algebra.FreeAlgebra
Expand Down Expand Up @@ -313,6 +314,7 @@ import Mathlib.Algebra.Group.Subsemigroup.Defs
import Mathlib.Algebra.Group.Subsemigroup.Membership
import Mathlib.Algebra.Group.Subsemigroup.Operations
import Mathlib.Algebra.Group.Support
import Mathlib.Algebra.Group.Translate
import Mathlib.Algebra.Group.TypeTags
import Mathlib.Algebra.Group.ULift
import Mathlib.Algebra.Group.UniqueProds.Basic
Expand Down Expand Up @@ -913,6 +915,7 @@ import Mathlib.AlgebraicGeometry.Morphisms.AffineAnd
import Mathlib.AlgebraicGeometry.Morphisms.Basic
import Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion
import Mathlib.AlgebraicGeometry.Morphisms.Constructors
import Mathlib.AlgebraicGeometry.Morphisms.Etale
import Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation
import Mathlib.AlgebraicGeometry.Morphisms.FiniteType
import Mathlib.AlgebraicGeometry.Morphisms.Immersion
Expand Down Expand Up @@ -948,6 +951,8 @@ import Mathlib.AlgebraicGeometry.ResidueField
import Mathlib.AlgebraicGeometry.Restrict
import Mathlib.AlgebraicGeometry.Scheme
import Mathlib.AlgebraicGeometry.Sites.BigZariski
import Mathlib.AlgebraicGeometry.Sites.Etale
import Mathlib.AlgebraicGeometry.Sites.MorphismProperty
import Mathlib.AlgebraicGeometry.Spec
import Mathlib.AlgebraicGeometry.SpreadingOut
import Mathlib.AlgebraicGeometry.Stalk
Expand Down Expand Up @@ -2094,6 +2099,7 @@ import Mathlib.Combinatorics.Enumerative.Catalan
import Mathlib.Combinatorics.Enumerative.Composition
import Mathlib.Combinatorics.Enumerative.DoubleCounting
import Mathlib.Combinatorics.Enumerative.DyckWord
import Mathlib.Combinatorics.Enumerative.IncidenceAlgebra
import Mathlib.Combinatorics.Enumerative.Partition
import Mathlib.Combinatorics.HalesJewett
import Mathlib.Combinatorics.Hall.Basic
Expand Down Expand Up @@ -2269,14 +2275,20 @@ import Mathlib.Data.Complex.Orientation
import Mathlib.Data.Countable.Basic
import Mathlib.Data.Countable.Defs
import Mathlib.Data.Countable.Small
import Mathlib.Data.DFinsupp.Basic
import Mathlib.Data.DFinsupp.BigOperators
import Mathlib.Data.DFinsupp.Defs
import Mathlib.Data.DFinsupp.Encodable
import Mathlib.Data.DFinsupp.Ext
import Mathlib.Data.DFinsupp.FiniteInfinite
import Mathlib.Data.DFinsupp.Interval
import Mathlib.Data.DFinsupp.Lex
import Mathlib.Data.DFinsupp.Module
import Mathlib.Data.DFinsupp.Multiset
import Mathlib.Data.DFinsupp.NeLocus
import Mathlib.Data.DFinsupp.Notation
import Mathlib.Data.DFinsupp.Order
import Mathlib.Data.DFinsupp.Sigma
import Mathlib.Data.DFinsupp.Submonoid
import Mathlib.Data.DFinsupp.WellFounded
import Mathlib.Data.DList.Instances
import Mathlib.Data.ENNReal.Basic
Expand All @@ -2292,6 +2304,7 @@ import Mathlib.Data.FP.Basic
import Mathlib.Data.Fin.Basic
import Mathlib.Data.Fin.Fin2
import Mathlib.Data.Fin.FlagRange
import Mathlib.Data.Fin.Parity
import Mathlib.Data.Fin.SuccPred
import Mathlib.Data.Fin.Tuple.Basic
import Mathlib.Data.Fin.Tuple.BubbleSortInduction
Expand All @@ -2312,18 +2325,28 @@ import Mathlib.Data.Finite.Sigma
import Mathlib.Data.Finite.Sum
import Mathlib.Data.Finite.Vector
import Mathlib.Data.Finmap
import Mathlib.Data.Finset.Attach
import Mathlib.Data.Finset.Attr
import Mathlib.Data.Finset.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Data.Finset.Dedup
import Mathlib.Data.Finset.Defs
import Mathlib.Data.Finset.Density
import Mathlib.Data.Finset.Disjoint
import Mathlib.Data.Finset.Empty
import Mathlib.Data.Finset.Erase
import Mathlib.Data.Finset.Filter
import Mathlib.Data.Finset.Fin
import Mathlib.Data.Finset.Finsupp
import Mathlib.Data.Finset.Fold
import Mathlib.Data.Finset.Functor
import Mathlib.Data.Finset.Grade
import Mathlib.Data.Finset.Image
import Mathlib.Data.Finset.Insert
import Mathlib.Data.Finset.Interval
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Finset.Lattice.Basic
import Mathlib.Data.Finset.Lattice.Fold
import Mathlib.Data.Finset.Lattice.Lemmas
import Mathlib.Data.Finset.Max
import Mathlib.Data.Finset.MulAntidiagonal
import Mathlib.Data.Finset.NAry
Expand All @@ -2340,13 +2363,16 @@ import Mathlib.Data.Finset.Piecewise
import Mathlib.Data.Finset.Powerset
import Mathlib.Data.Finset.Preimage
import Mathlib.Data.Finset.Prod
import Mathlib.Data.Finset.Range
import Mathlib.Data.Finset.SDiff
import Mathlib.Data.Finset.SMulAntidiagonal
import Mathlib.Data.Finset.Sigma
import Mathlib.Data.Finset.Slice
import Mathlib.Data.Finset.Sort
import Mathlib.Data.Finset.Sum
import Mathlib.Data.Finset.Sups
import Mathlib.Data.Finset.Sym
import Mathlib.Data.Finset.SymmDiff
import Mathlib.Data.Finset.Union
import Mathlib.Data.Finset.Update
import Mathlib.Data.Finsupp.AList
Expand Down Expand Up @@ -2927,7 +2953,9 @@ import Mathlib.Geometry.Manifold.Diffeomorph
import Mathlib.Geometry.Manifold.Instances.Real
import Mathlib.Geometry.Manifold.Instances.Sphere
import Mathlib.Geometry.Manifold.Instances.UnitsOfNormedAlgebra
import Mathlib.Geometry.Manifold.IntegralCurve
import Mathlib.Geometry.Manifold.IntegralCurve.Basic
import Mathlib.Geometry.Manifold.IntegralCurve.ExistUnique
import Mathlib.Geometry.Manifold.IntegralCurve.Transform
import Mathlib.Geometry.Manifold.InteriorBoundary
import Mathlib.Geometry.Manifold.LocalDiffeomorph
import Mathlib.Geometry.Manifold.LocalInvariantProperties
Expand Down Expand Up @@ -4286,6 +4314,7 @@ import Mathlib.RingTheory.Polynomial.ScaleRoots
import Mathlib.RingTheory.Polynomial.Selmer
import Mathlib.RingTheory.Polynomial.SeparableDegree
import Mathlib.RingTheory.Polynomial.Tower
import Mathlib.RingTheory.Polynomial.UniqueFactorization
import Mathlib.RingTheory.Polynomial.Vieta
import Mathlib.RingTheory.Polynomial.Wronskian
import Mathlib.RingTheory.PolynomialAlgebra
Expand Down Expand Up @@ -4751,6 +4780,8 @@ import Mathlib.Topology.Algebra.Module.WeakDual
import Mathlib.Topology.Algebra.Monoid
import Mathlib.Topology.Algebra.MulAction
import Mathlib.Topology.Algebra.MvPolynomial
import Mathlib.Topology.Algebra.NonUnitalAlgebra
import Mathlib.Topology.Algebra.NonUnitalStarAlgebra
import Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology
import Mathlib.Topology.Algebra.Nonarchimedean.Bases
import Mathlib.Topology.Algebra.Nonarchimedean.Basic
Expand Down
1 change: 1 addition & 0 deletions Mathlib/Algebra/Algebra/Bilinear.lean
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def mul : A →ₗ[R] A →ₗ[R] A :=
LinearMap.mk₂ R (· * ·) add_mul smul_mul_assoc mul_add mul_smul_comm

/-- The multiplication map on a non-unital algebra, as an `R`-linear map from `A ⊗[R] A` to `A`. -/
-- TODO: upgrade to A-linear map if A is a semiring.
noncomputable def mul' : A ⊗[R] A →ₗ[R] A :=
TensorProduct.lift (mul R A)

Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Algebra/DirectSum/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau
-/
import Mathlib.Algebra.Group.Submonoid.Operations
import Mathlib.Data.DFinsupp.Basic
import Mathlib.Data.DFinsupp.Sigma
import Mathlib.Data.DFinsupp.Submonoid

/-!
# Direct sum
Expand Down
12 changes: 12 additions & 0 deletions Mathlib/Algebra/Field/Rat.lean
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ protected lemma inv_nonneg {a : ℚ} (ha : 0 ≤ a) : 0 ≤ a⁻¹ := by
protected lemma div_nonneg {a b : ℚ} (ha : 0 ≤ a) (hb : 0 ≤ b) : 0 ≤ a / b :=
mul_nonneg ha (Rat.inv_nonneg hb)

protected lemma zpow_nonneg {a : ℚ} (ha : 0 ≤ a) : ∀ n : ℤ, 0 ≤ a ^ n
| Int.ofNat n => by simp [ha]
| Int.negSucc n => by simpa using Rat.inv_nonneg (pow_nonneg ha (n + 1))

end Rat

namespace NNRat
Expand All @@ -56,8 +60,12 @@ instance instInv : Inv ℚ≥0 where
instance instDiv : Div ℚ≥0 where
div x y := ⟨x / y, Rat.div_nonneg x.2 y.2

instance instZPow : Pow ℚ≥0where
pow x n := ⟨x ^ n, Rat.zpow_nonneg x.2 n⟩

@[simp, norm_cast] lemma coe_inv (q : ℚ≥0) : ((q⁻¹ : ℚ≥0) : ℚ) = (q : ℚ)⁻¹ := rfl
@[simp, norm_cast] lemma coe_div (p q : ℚ≥0) : ((p / q : ℚ≥0) : ℚ) = p / q := rfl
@[simp, norm_cast] lemma coe_zpow (p : ℚ≥0) (n : ℤ) : ((p ^ n : ℚ≥0) : ℚ) = p ^ n := rfl

lemma inv_def (q : ℚ≥0) : q⁻¹ = divNat q.den q.num := by ext; simp [Rat.inv_def', num_coe, den_coe]
lemma div_def (p q : ℚ≥0) : p / q = divNat (p.num * q.den) (p.den * q.num) := by
Expand Down Expand Up @@ -85,5 +93,9 @@ instance instSemifield : Semifield ℚ≥0 where
nnratCast_def q := q.num_div_den.symm
nnqsmul q a := q * a
nnqsmul_def q a := rfl
zpow n a := a ^ n
zpow_zero' a := by ext; norm_cast
zpow_succ' n a := by ext; norm_cast
zpow_neg' n a := by ext; norm_cast

end NNRat
Loading

0 comments on commit 4332bcd

Please sign in to comment.