-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b5e6df3
commit 7bc137a
Showing
31 changed files
with
1,681 additions
and
1,450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import Mathlib.Algebra.Algebra.Rat | ||
import Mathlib.Algebra.Module.Basic | ||
|
||
variable {α β : Type*} | ||
|
||
instance [Monoid α] [AddCommMonoid β] [Module ℚ≥0 β] [DistribMulAction α β] : | ||
SMulCommClass ℚ≥0 α β where | ||
smul_comm q a b := by | ||
rw [← q.num_div_den, div_eq_mul_inv] | ||
simp_rw [mul_smul, inv_natCast_smul_comm, Nat.cast_smul_eq_nsmul] | ||
rw [smul_comm a q.num] | ||
|
||
instance [Monoid α] [AddCommMonoid β] [Module ℚ≥0 β] [DistribMulAction α β] : | ||
SMulCommClass α ℚ≥0 β := .symm .. | ||
|
||
instance [Semiring α] [Module ℚ≥0 α] : IsScalarTower ℚ≥0 α α where | ||
smul_assoc q a b := sorry | ||
|
||
instance [Monoid α] [AddCommGroup β] [Module ℚ β] [DistribMulAction α β] : | ||
SMulCommClass ℚ α β where | ||
smul_comm q a b := by | ||
rw [← q.num_div_den, div_eq_mul_inv] | ||
simp_rw [mul_smul, inv_natCast_smul_comm, Int.cast_smul_eq_zsmul] | ||
rw [smul_comm a q.num] | ||
|
||
instance [Monoid α] [AddCommGroup β] [Module ℚ β] [DistribMulAction α β] : SMulCommClass α ℚ β := | ||
.symm .. | ||
|
||
instance [Ring α] [Module ℚ α] : IsScalarTower ℚ α α where | ||
smul_assoc q a b := sorry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Mathlib.Algebra.Group.Action.Defs | ||
|
||
@[to_additive] | ||
lemma smul_mul_smul_comm {α β : Type*} [Mul α] [Mul β] [SMul α β] [IsScalarTower α β β] | ||
[IsScalarTower α α β] [SMulCommClass β α β] (a : α) (b : β) (c : α) (d : β) : | ||
(a • b) * c • d = (a * c) • (b * d) := smul_smul_smul_comm a b c d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Mathlib.Algebra.Order.Module.Defs | ||
|
||
attribute [gcongr] smul_le_smul_of_nonneg_left smul_le_smul_of_nonneg_right | ||
smul_lt_smul_of_pos_left smul_lt_smul_of_pos_right |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import Mathlib.Algebra.Star.Basic | ||
|
||
/-! | ||
# TODO | ||
Swap arguments to `star_nsmul`/`star_zsmul` | ||
-/ | ||
|
||
variable {α : Type*} | ||
|
||
instance StarAddMonoid.toStarModuleInt [AddCommGroup α] [StarAddMonoid α] : StarModule ℤ α where | ||
star_smul _ _ := star_zsmul _ _ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Mathlib.Algebra.Module.Defs | ||
import Mathlib.Algebra.Star.Rat | ||
|
||
variable {α : Type*} | ||
|
||
@[simp] lemma star_nnqsmul [AddCommMonoid α] [Module ℚ≥0 α] [StarAddMonoid α] (q : ℚ≥0) (a : α) : | ||
star (q • a) = q • star a := sorry | ||
|
||
@[simp] lemma star_qsmul [AddCommGroup α] [Module ℚ α] [StarAddMonoid α] (q : ℚ) (a : α) : | ||
star (q • a) = q • star a := sorry | ||
|
||
instance StarAddMonoid.toStarModuleNNRat [AddCommMonoid α] [Module ℚ≥0 α] [StarAddMonoid α] : | ||
StarModule ℚ≥0 α where star_smul := star_nnqsmul | ||
|
||
instance StarAddMonoid.toStarModuleRat [AddCommGroup α] [Module ℚ α] [StarAddMonoid α] : | ||
StarModule ℚ α where star_smul := star_qsmul |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Mathlib.Data.NNReal.Basic | ||
|
||
namespace NNReal | ||
|
||
@[simp, norm_cast] lemma coe_nnqsmul (q : ℚ≥0) (x : ℝ≥0) : ↑(q • x) = (q • x : ℝ) := rfl | ||
|
||
end NNReal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Mathlib.Probability.ConditionalProbability | ||
|
||
open ENNReal MeasureTheory MeasureTheory.Measure MeasurableSpace Set | ||
|
||
variable {Ω Ω' α : Type*} {m : MeasurableSpace Ω} {m' : MeasurableSpace Ω'} (μ : Measure Ω) | ||
{s t : Set Ω} | ||
|
||
namespace ProbabilityTheory | ||
|
||
@[simp] lemma cond_apply_self (hs₀ : μ s ≠ 0) (hs : μ s ≠ ∞) : μ[|s] s = 1 := by | ||
simpa [cond] using ENNReal.inv_mul_cancel hs₀ hs | ||
|
||
end ProbabilityTheory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.