trait Typ[+U <: Term with Subs[U]] extends Term with Subs[Typ[U]]
HoTT Type; The compiler knows that objects have scala-type extending U. In particular, we can specify that the objects are types, functions, dependent functions etc.
- U
bound on scala type of objects with
this
as type. in practice, it is symbolic objects of the type whose scala type is bounded.
- Self Type
- Typ[U]
- Alphabetic
- By Inheritance
- Typ
- Term
- Subs
- AnyRef
- Any
- by RichTerm
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Type Members
Abstract Value Members
- abstract def newobj: Typ[U] with Subs[Typ[U]]
A new object with the same type, to be used in place of a variable to avoid name clashes.
A new object with the same type, to be used in place of a variable to avoid name clashes. Should throw exception when invoked for constants.
- Definition Classes
- Subs
- abstract def subs(x: Term, y: Term): Typ[U] with Subs[Typ[U]]
substitute x by y recursively in
this
.substitute x by y recursively in
this
.- Definition Classes
- Subs
- abstract val typ: Univ
type of a type is a universe.
- abstract def variable(name: AnySym): Obj with Subs[Obj]
A symbolic object with this HoTT type, and with scala-type Obj
Concrete Value Members
- def !:(term: Term): U
checks term is of this type and returns it; useful for documentation.
- def &&[UU >: U <: Term with Subs[UU], V <: Term with Subs[V]](that: Typ[V]): ProdTyp[UU, V]
returns product type, mainly to use for "and" for structures
- def &:[UU >: U <: Term with Subs[UU], V <: Term with Subs[V]](variable: V): SigmaTyp[V, UU]
- def ++[UU >: Typ[U] <: Typ[Term] with Subs[UU], VV <: Term with Subs[VV], V <: Typ[VV] with Subs[V]](those: V): SigmaTyp[UU, VV]
returns Sigma-Type, mainly to use as "such that", for example a group type is this with product etc.
returns Sigma-Type, mainly to use as "such that", for example a group type is this with product etc. dependent on this.
- def ->:[W <: Term with Subs[W], UU >: U <: Term with Subs[UU]](that: Typ[W]): FuncTyp[W, UU]
function type:
this -> that
- def :->[V <: Term with Subs[V]](that: V): Func[Typ[U], V]
constructor for (pure) lambda functions, see lmbda
- def ::(name: String): U
symbolic object with given name
- def :~>[V <: Term with Subs[V]](that: V): FuncLike[Typ[U], V]
constructor for (in general dependent) lambda functions, see lambda
- def =:=(rhs: Typ[U]): IdentityTyp[Typ[U]]
equality type 'term = rhs'
equality type 'term = rhs'
- Implicit
- This member is added by an implicit conversion from Typ[U] toRichTerm[Typ[U]] performed by method RichTerm in provingground.HoTT.
- Definition Classes
- RichTerm
- def Var(implicit factory: NameFactory): U
new variable from a factory.
- def dependsOn(that: Term): Boolean
returns whether
this
depends onthat
returns whether
this
depends onthat
- Definition Classes
- Term
- def indepOf(that: Term): Boolean
returns whether
this
is independent ofthat
.returns whether
this
is independent ofthat
.- Definition Classes
- Term
- def obj: U
factory for producing objects of the given type.
factory for producing objects of the given type. can use {{innervar}} if one wants name unchanged.
- def refl: Refl[Typ[U]]
reflexivity term
refl : term = term
reflexivity term
refl : term = term
- Implicit
- This member is added by an implicit conversion from Typ[U] toRichTerm[Typ[U]] performed by method RichTerm in provingground.HoTT.
- Definition Classes
- RichTerm
- def replace(x: Term, y: Term): Typ[U] with Subs[Typ[U]]
refine substitution so if x and y are both of certain forms such as pairs or formal applications, components are substituted.
refine substitution so if x and y are both of certain forms such as pairs or formal applications, components are substituted.
- Definition Classes
- Subs
- def sym(implicit name: sourcecode.Name): U
shortcut for symbolic object
- def symbObj(name: AnySym): U with Subs[U]
A symbolic object with this HoTT type, and with scala-type Obj
- lazy val typlevel: Int
- def usesVar(t: Term): Boolean
returns whether the variable
t
is used as a variable in a lambda definition.returns whether the variable
t
is used as a variable in a lambda definition.- Definition Classes
- Term
- def ||[UU >: U <: Term with Subs[UU], V <: Term with Subs[V]](that: Typ[V]): PlusTyp[UU, V]
returns coproduct type, mainly to use for "or".
- def ~>:[UU >: U <: Term with Subs[UU], V <: Term with Subs[V]](variable: V): GenFuncTyp[V, UU]
dependent function type (Pi-Type) define by a lambda:
this
depends on thevariable
, which hence gives a type family; note that a new variable is created and substituted inthis
to avoid name clashes. - object Elem
Pattern for element of the given type.