- split
·-reflects-<
into·-reflects-<ˡ
and·-reflects-<ʳ
- we use
·-reflects-≡ˡ
where the standard library uses the nomer "injective" like*-injˡ
(or something similar)- since
preserves-≡
is automatic, we might switch to·-injectiveˡ
instead of·-reflects-≡ˡ
- since
- we have
+-rinv
,+-inverse
andʳ
ˡ
variants in use ⇒ unify them! - in equivalences, we still need to follow the convention that the "simpler" term is the RHS
e.g.
·-creates-< : ∀ a b x → [ 0 < x ] → [ (a < b) ⇔ ((a · x) < (b · x)) ]
is wrong (this needs to be checked)
- Lemma 6.7.1. contains more properties that are provable on ordered fields already
- some of them look like we've proven them for Bridges1999 already
- is it possible to proof
comm
,assoc
andabsorbs
fromisMin
andisMax
? - merge the notes with Hit.agda
- check whether this
rinv
linv
lemmaʳ
lemmaˡ
is the way its done in the standard library - is
+-<-extensional
the right name for∀ w x y z → (x + y) < (z + w) → (x < z) ⊎ (y < w)
? - get the absolute value function
abs
into the number hierarchy - get the square root function
sqrt
into the number hierarchy - complete all necessary axioms in the number hierarchy
- then divide into necessary axioms and derivable theorems
- and try to proof the theorems
- then divide into necessary axioms and derivable theorems
- use equivalences intstead of
lemma
andlemma-back
- can we use
preserves
andreflects
instead oflemma
andlemma-back
?- "f preserves P: P A ⇒ P (f A)"
- "f reflects P: P (f A) ⇒ P A"
- name the "items" (from Bridges 1999)
- can't we just use ℚ from the non-cubical standard library?
- yes ... but we need to add missing properties (e.g.
_<_
andmin
,max
)
- yes ... but we need to add missing properties (e.g.
- likely due to #1646 we might flatten-out the module hierarchy for better performance
- How to structure the algebraic number hierarchy: bundling/unbundling and "What makes a bundle-morphism"?
isX : IsX
is called "the unbundle"x : X
without itsisX : IsX
is called "raw"- there is a recent email on the agda mailing list from Arjen Rouvoet (10.08.20, 18:27)
The problem you encounter is wellknown under the name 'the (un)bundling problem': i.e., the problem of choosing which fields should be parameters, and which should be fields. The problem is hard, in the sense that every permutation you can think of has applications. The Agda standard library chooses to do what most other languages have done previously: i.e., provide a unbundled IsStructure, and a bundled Structure.
- also see #876
- also see the short discussion
- there is the isabelle tutorial with "8.4.5 The Numeric Type Classes"
- semiring and ordered_semiring
- ring and ordered_ring ... An ordered ring includes the absolute value function, abs.
- field and ordered_field
- division_by_zero includes all types where
inverse 0 = 0
anda / 0 = 0
. These include all of Isabelle’s standard numeric types. However, the basic properties of fields are derived without assuming division by zero.
- make use of .lagda.md for the parts that literally follow Booij's thesis
- in
Cubical.Functions.Bundle
we have a definition of fibre bundle - the
Categories
part of the cubical standard library is quite readable!
- subsets and embeddings
- checkout
Cubical.Foundations.Logic
where-- We show that the powerset is the subtype classifier -- i.e. ℙ X ≃ Σ[A ∈ Type ℓ] (A ↪ X) Embedding→Subset : {X : Type ℓ} → Σ[ A ∈ Type ℓ ] (A ↪ X) → ℙ X Embedding→Subset (_ , f , isPropFiber) x = fiber f x , isPropFiber x Subset→Embedding : {X : Type ℓ} → ℙ X → Σ[ A ∈ Type ℓ ] (A ↪ X) Subset→Embedding {X = X} A = D , f , ψ where ...
hasPropFibers : (A → B) → Type _ hasPropFibers f = ∀ y → isProp (fiber f y) _↪_ : Type ℓ → Type ℓ → Type ℓ A ↪ B = Σ[ f ∈ (A → B) ] hasPropFibers f
- there is also
- checkout
- check out
Relation.Binary.Structures
where we can also findIsStrictPartialOrder
(whether we can use this)- also see in
Data.Nat.Properties
the definition ofStructures
andBundles
- here, under
Structures
we find theIsX
records, where underBundles
there is the correspondingX
record - the cubical standard library uses
Cubical.Data.Nat
andCubical.Data.Nat.Order
- here, under
- also see in
- check out
Foreign.Haskell.Coerce
for a coercion mechanismdata Coercible (A : Set a) (B : Set b) : Set where TrustMe : Coercible A B postulate coerce : {{_ : Coercible A B}} → A → B
- check out
Agda.Builtin.FromNat
for a coercion mechanismrecord Number {a} (A : Set a) : Set (lsuc a) where field Constraint : Nat → Set a fromNat : ∀ n → {{_ : Constraint n}} → A open Number {{...}} public using (fromNat) {-# BUILTIN FROMNAT fromNat #-} {-# DISPLAY Number.fromNat _ n = fromNat n #-}
- this is used in
Cubical.Data.Nat.Literals
and inCubical.HITs.Rationals.QuoQ.Base
- this is used in
- check out what is meant by "Instance modules" in non-cubical 1.4-rc1
Category.Monad.Partiality.Instances Codata.Stream.Instances Codata.Covec.Instances Data.List.Instances Data.List.NonEmpty.Instances Data.Maybe.Instances Data.Vec.Instances Function.Identity.Instances
- check out "New standardised numeric predicates
NonZero
,Positive
,Negative
,NonPositive
,NonNegative
, especially designed to work as instance arguments." - the use of instances seems to be very recent, since they also write "First instance modules, which provide
Functor
,Monad
,Applicative
instances for various datatypes. Found underData.X.Instances
."
- check out "New standardised numeric predicates
- check out "irrelevancy annotations" and whether they serve as some form of "term abstractification" (i.e. blocking the term normalization)
- does this work with
--cubical
? what is its intention?
- does this work with
- use of
hProp
scheckoutCubical.Structures.Poset
- provide a Σ-theory similar to
CommRingΣTheory
with axioms and structure