Checks that the correct variant of Cubical Agda is activated.
Note that --erased-cubical "counts as" --cubical in erased
contexts.
ModuleAgda-2.8.0.2Haskell2010
Agda.TypeChecking.Primitive.Cubical.Base
Implementations of the basic primitives of Cubical Agda: The interval and its operations.
- 4 types
- 19 values
- PackageAgda-2.8.0.2
- Exports23
- LanguageHaskell2010
- LicenceMIT
- SourceBase.hs
primIntervalType :: (HasBuiltins m, MonadError TCErr m, MonadTCEnv m, ReadTCState m) => m TypeOur good friend the interval type.
Implements both the min connection and conjunction on the
cofibration classifier.
Implements both the max connection and disjunction on the
cofibration classifier.
Negation on the interval. Negation satisfies De Morgan's laws, and their implementation is handled here.
A helper for evaluating max on the interval in TCM&co.
A helper for evaluating min on the interval in TCM&co.
A helper for evaluating neg on the interval in TCM&co.
Our Kan operations are transp and hcomp. The KanOperation
record stores the data associated with a Kan operation on arbitrary
types: A cofibration and an element of that type.
Constructors
TranspOpA transport problem consists of a cofibration, marking where the transport is constant, and a term to move from the fibre over i0 to the fibre over i1.
HCompOpA composition problem consists of a partial element and a base. Semantically, this is justified by the types being Kan fibrations, i.e., having the lifting property against trivial cofibrations. While the specified cofibration may not be trivial, (φ ∨ ~ r) for r ∉ φ is *always* a trivial cofibration.
kanOpCofib :: Blocked (Arg Term)When this cofibration holds, the transport must definitionally be the identity. This is handled generically by
primTransHCompbut specific Kan operations may still need it.kanOpSides :: Arg TermThe partial element itself
kanOpBase :: Arg TermThis is the term in
A i0which we are transporting.
The built-in name associated with a particular Kan operation.
For the Kan operations in Glue and hcomp {Type}, we optimise
evaluation a tiny bit by differentiating the term produced when
evaluating a Kan operation by itself vs evaluating it under unglue.
(See headStop below.)
Instances2Eq, Show
Eq TermPositionDefined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.BaseShow TermPositionDefined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.Base
Kan operations for the "unstable" type formers (Glue, hcomp {Type}) are
computed "negatively": they never actually produce a glue φ t a term. Instead,
we block the computation unless such a term would reduce further, which happens
in two cases:
when the formula
φis i1, in which case we reduce tot;when we're under an
unglue, i.e. in Eliminated TermPosition, in which case we reduce toa.
Are we looking at a family of things, or at a single thing?
Instances6Functor, Foldable, Traversable, Eq, Show, Reduce
Functor FamilyOrNotDefined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.BaseFoldable FamilyOrNotDefined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.BaseTraversable FamilyOrNotDefined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.BaseEq a => Eq (FamilyOrNot a)Defined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.BaseShow a => Show (FamilyOrNot a)Defined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.BaseReduce a => Reduce (FamilyOrNot a)Defined in Agda-2.8.0.2 · Agda.TypeChecking.Primitive.Cubical.Base
Helper functions for building terms
8 declarationscombineSys Build a partial element. The type of the resulting partial element
can depend on the computed extent, which we denote by φ here. Note
that φ is the n-ary disjunction of all the ψs.
Build a partial element, and compute its extent. See combineSys for the details.
Helper function for constructing the type of fibres of a function over a given point.
Helper function for constructing the filler of a given composition problem.
Decompose an interval expression φ : I into a set of possible
assignments for the variables mentioned in φ, together any leftover
neutral terms that could not be put into IntervalView form.
Decompose an interval expression i : I as in
decomposeInterval', but discard any inconsistent mappings.
Are we looking at an application of the Sub type? If so, return:
* The type we're an extension of
* The extent
* The partial element.