Module aya.base

Record Class CoeTerm

java.lang.Object
java.lang.Record
org.aya.core.term.CoeTerm
All Implemented Interfaces:
Term, AyaDocile, org.aya.guest0x0.cubical.Restr.TermLike<Term>

public record CoeTerm(@NotNull Term type, @NotNull Term r, @NotNull Term s) extends Record implements Term
  • Constructor Details

    • CoeTerm

      public CoeTerm(@NotNull @NotNull Term type, @NotNull @NotNull Term r, @NotNull @NotNull Term s)
      Creates an instance of a CoeTerm record class.
      Parameters:
      type - the value for the type record component
      r - the value for the r record component
      s - the value for the s record component
  • Method Details

    • update

      @NotNull public @NotNull CoeTerm update(@NotNull @NotNull Term type, @NotNull @NotNull Term r, @NotNull @NotNull Term s)
    • descent

      @NotNull public @NotNull CoeTerm descent(@NotNull @NotNull UnaryOperator<Term> f, @NotNull @NotNull UnaryOperator<Pat> g)
      Description copied from interface: Term
      Descending an operation to the term AST. NOTE: Currently we require the operation `f` to preserve:
      invalid @link
      StructCall
      , DataCall, SortTerm, Shaped.Applicable.
      Specified by:
      descent in interface Term
    • inverse

      @NotNull public @NotNull CoeTerm inverse(Term newTy)
    • cover

      @NotNull public static @NotNull LamTerm cover(LamTerm.Param x, Term.Param A, Term B, Term arg, Term r)
      For parameter and variable names, see Carlo Angiuli's PhD thesis, page 160.
      • x ∈ FV(A.type()), x ∈ FV(B)
      • A.ref() ∈ FV(B)
      Returns:
      \x : A.type() => B[coe(r, x, A, arg) / A.ref()]
    • recoe

      @NotNull public @NotNull CoeTerm recoe(Term cover)
    • family

      @NotNull public @NotNull Term family()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      @NotNull public @NotNull Term type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • r

      @NotNull public @NotNull Term r()
      Returns the value of the r record component.
      Returns:
      the value of the r record component
    • s

      @NotNull public @NotNull Term s()
      Returns the value of the s record component.
      Returns:
      the value of the s record component