Packages

  • package root
    Definition Classes
    root
  • package provingground

    This is work towards automated theorem proving based on learning, using homotopy type theory (HoTT) as foundations and natural language processing.

    This is work towards automated theorem proving based on learning, using homotopy type theory (HoTT) as foundations and natural language processing.

    The implementation of homotopy type theory is split into:

    • the object HoTT with terms, types, functions and dependent functions, pairs etc
    • the package induction with general inductive types and recursion/induction on these.

    The learning package has the code for learning.

    Scala code, including the spire library, is integrated with homotopy type theory in the scalahott package

    We have implemented a functor based approach to translation in the translation package, used for nlp as well as serialization and parsing.

    The library package is contains basic structures implemented in HoTT.

    Definition Classes
    root
  • package induction

    Much of the richness of HoTT is in the definitions of Inductive types (and their indexed counterparts) and of (dependent) functions on these by recursion and induction These are implemented using several layers of recursive definitions and diagonals (i.e., fixed points).

    Much of the richness of HoTT is in the definitions of Inductive types (and their indexed counterparts) and of (dependent) functions on these by recursion and induction These are implemented using several layers of recursive definitions and diagonals (i.e., fixed points). In HoTT, recursion and induction are applications of (dependent) functions rec_W,X and ind_W, Xs to the definition data.

    It is useful to capture information regarding inductive types and the recursion and induction functions in scala types. Our implementation is designed to do this.

    Inductive Type Definitions

    Inductive types are specified by introduction rules. Each introduction rule is specified in ConstructorShape (without specifying the type) and ConstructorTL including the specific type. The full definition is in ConstructorSeqTL.

    Recursion and Induction functions

    These are defined recursively, first for each introduction rule and then for the inductive type as a whole. A subtlety is that the scala type of the rec_W,X and induc_W, Xs functions depends on the scala type of the codomain X (or family Xs). To make these types visible, some type level calculations using implicits are done, giving traits ConstructorPatternMap and ConstructorSeqMap that have recursive definition of the recursion and induction functions, the former for the case of a single introduction rule. Traits ConstructorSeqMapper and ConstructorPatternMapper provide the lifts.

    Indexed Versions

    There are indexed versions of all these definitions, to work with indexed inductive type families.

    Definition Classes
    provingground
  • package coarse

    an earlier implementation of induction, without clean separation of codomain scala types; use induction instead

    an earlier implementation of induction, without clean separation of codomain scala types; use induction instead

    Definition Classes
    induction
  • BaseConstructorTypes
  • Constructor
  • ConstructorDefn
  • ConstructorPattern
  • ConstructorSeq
  • ConstructorTyp
  • Curry
  • FmlyPtn
  • Implicits
  • IndexedConstructorPatterns
  • InductiveTyp
  • InductiveTypDefinition
  • IterFuncPattern
c

provingground.induction.coarse

InductiveTypDefinition

case class InductiveTypDefinition[C <: Term with Subs[C]](constructorDefs: List[(Typ[Term]) => Constructor[C, Term]]) extends InductiveTyp[C, Term] with Product with Serializable

Linear Supertypes
Serializable, Product, Equals, InductiveTyp[C, Term], Typ[Term], Term, Subs[Typ[Term]], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. InductiveTypDefinition
  2. Serializable
  3. Product
  4. Equals
  5. InductiveTyp
  6. Typ
  7. Term
  8. Subs
  9. AnyRef
  10. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new InductiveTypDefinition(constructorDefs: List[(Typ[Term]) => Constructor[C, Term]])

Type Members

  1. type Obj = Term

    As seen from class InductiveTypDefinition, the missing signatures are as follows.

    As seen from class InductiveTypDefinition, the missing signatures are as follows. * For convenience, these are usable as stub implementations.

    Definition Classes
    InductiveTypDefinitionTyp

Value Members

  1. object Elem

    Pattern for element of the given type.

    Pattern for element of the given type.

    Definition Classes
    Typ
  2. def !:(term: Term): Term

    checks term is of this type and returns it; useful for documentation.

    checks term is of this type and returns it; useful for documentation.

    Definition Classes
    Typ
  3. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def ##: Int
    Definition Classes
    AnyRef → Any
  5. def &&[UU >: Term <: 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

    returns product type, mainly to use for "and" for structures

    Definition Classes
    Typ
  6. def &:[UU >: Term <: Term with Subs[UU], V <: Term with Subs[V]](variable: V): SigmaTyp[V, UU]
    Definition Classes
    Typ
  7. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toany2stringadd[InductiveTypDefinition[C]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  8. def ++[UU >: Typ[Term] <: 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.

    Definition Classes
    Typ
  9. def ->[B](y: B): (InductiveTypDefinition[C], B)
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toArrowAssoc[InductiveTypDefinition[C]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  10. def ->:[W <: Term with Subs[W], UU >: Term <: Term with Subs[UU]](that: Typ[W]): FuncTyp[W, UU]

    function type: this -> that

    function type: this -> that

    Definition Classes
    Typ
  11. def ::(name: String): Term

    symbolic object with given name

    symbolic object with given name

    Definition Classes
    Typ
  12. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def Var(implicit factory: NameFactory): Term

    new variable from a factory.

    new variable from a factory.

    Definition Classes
    Typ
  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  16. val constructorDefs: List[(Typ[Term]) => Constructor[C, Term]]
  17. val constructorFns: List[Term]

    just the constructor functions

    just the constructor functions

    Definition Classes
    InductiveTyp
  18. lazy val constructors: List[Constructor[C, Term]]
    Definition Classes
    InductiveTypDefinitionInductiveTyp
  19. def dependsOn(that: Term): Boolean

    returns whether this depends on that

    returns whether this depends on that

    Definition Classes
    Term
  20. def ensuring(cond: (InductiveTypDefinition[C]) => Boolean, msg: => Any): InductiveTypDefinition[C]
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toEnsuring[InductiveTypDefinition[C]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: (InductiveTypDefinition[C]) => Boolean): InductiveTypDefinition[C]
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toEnsuring[InductiveTypDefinition[C]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean, msg: => Any): InductiveTypDefinition[C]
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toEnsuring[InductiveTypDefinition[C]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def ensuring(cond: Boolean): InductiveTypDefinition[C]
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toEnsuring[InductiveTypDefinition[C]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toStringFormat[InductiveTypDefinition[C]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. def indepOf(that: Term): Boolean

    returns whether this is independent of that.

    returns whether this is independent of that.

    Definition Classes
    Term
  28. def induc(Xs: Func[Term, Typ[C]]): InducType
    Definition Classes
    InductiveTyp
  29. def inducFn[CC <: Term with Subs[CC]](Xs: Func[Term, Typ[CC]]): InducType
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. def newobj: Nothing

    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
    InductiveTypDefinitionSubs
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  35. def obj: Term

    factory for producing objects of the given type.

    factory for producing objects of the given type. can use {{innervar}} if one wants name unchanged.

    Definition Classes
    Typ
  36. def productElementNames: Iterator[String]
    Definition Classes
    Product
  37. val ptns: List[ConstructorPattern[C, InductiveTyp.ptns.$anonfun.x$1.type.ConstructorType, Term] forSome {val x$1: Constructor[C, Term]}]

    just the constructor patterns.

    just the constructor patterns.

    Definition Classes
    InductiveTyp
  38. def rec(X: Typ[C]): RecType
    Definition Classes
    InductiveTyp
  39. def recFn[CC <: Term with Subs[CC]](X: Typ[CC]): RecType
  40. def replace(x: Term, y: Term): Typ[Term] with Subs[Typ[Term]]

    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
  41. def subs(x: Term, y: Term): InductiveTypDefinition[C]

    substitute x by y recursively in this.

    substitute x by y recursively in this.

    Definition Classes
    InductiveTypDefinitionSubs
  42. def sym(implicit name: Name): Term

    shortcut for symbolic object

    shortcut for symbolic object

    Definition Classes
    Typ
  43. def symbObj(name: AnySym): Term with Subs[Term]

    A symbolic object with this HoTT type, and with scala-type Obj

    A symbolic object with this HoTT type, and with scala-type Obj

    Definition Classes
    Typ
  44. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  45. val typ: Universe

    type of a type is a universe.

    type of a type is a universe.

    Definition Classes
    InductiveTypDefinitionTypTerm
  46. lazy val typlevel: Int
    Definition Classes
    Typ
  47. 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
  48. def variable(name: AnySym): SymbObj[Term]

    A symbolic object with this HoTT type, and with scala-type Obj

    A symbolic object with this HoTT type, and with scala-type Obj

    Definition Classes
    InductiveTypDefinitionTyp
  49. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  50. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  51. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. def withCod[CC <: Term with Subs[CC]]: InductiveTypDefinition[CC]
  53. def ||[UU >: Term <: Term with Subs[UU], V <: Term with Subs[V]](that: Typ[V]): PlusTyp[UU, V]

    returns coproduct type, mainly to use for "or".

    returns coproduct type, mainly to use for "or".

    Definition Classes
    Typ
  54. def ~>:[UU >: Term <: 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 the variable, which hence gives a type family; note that a new variable is created and substituted in this to avoid name clashes.

    dependent function type (Pi-Type) define by a lambda: this depends on the variable, which hence gives a type family; note that a new variable is created and substituted in this to avoid name clashes.

    Definition Classes
    Typ

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def [B](y: B): (InductiveTypDefinition[C], B)
    Implicit
    This member is added by an implicit conversion from InductiveTypDefinition[C] toArrowAssoc[InductiveTypDefinition[C]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.13.0) Use -> instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from InductiveTyp[C, Term]

Inherited from Typ[Term]

Inherited from Term

Inherited from Subs[Typ[Term]]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromInductiveTypDefinition[C] to any2stringadd[InductiveTypDefinition[C]]

Inherited by implicit conversion StringFormat fromInductiveTypDefinition[C] to StringFormat[InductiveTypDefinition[C]]

Inherited by implicit conversion Ensuring fromInductiveTypDefinition[C] to Ensuring[InductiveTypDefinition[C]]

Inherited by implicit conversion ArrowAssoc fromInductiveTypDefinition[C] to ArrowAssoc[InductiveTypDefinition[C]]

Ungrouped