Module aya.base

Record Class Subst

java.lang.Object
java.lang.Record
org.aya.core.visitor.Subst
All Implemented Interfaces:
AyaDocile, org.aya.guest0x0.cubical.CofThy.SubstObj<Term,LocalVar,Subst>

public record Subst(@NotNull kala.collection.mutable.MutableMap<@NotNull AnyVar,@NotNull Term> map) extends Record implements AyaDocile, org.aya.guest0x0.cubical.CofThy.SubstObj<Term,LocalVar,Subst>
"Substitution object"
  • Field Details

    • EMPTY

      @NotNull public static final @NotNull Subst EMPTY
  • Constructor Details

    • Subst

      public Subst()
    • Subst

      public Subst(@NotNull @NotNull AnyVar var, @NotNull @NotNull Term term)
    • Subst

      public Subst(@NotNull @NotNull kala.collection.SeqLike<LocalVar> from, @NotNull @NotNull kala.collection.SeqLike<? extends Term> to)
    • Subst

      public Subst(@NotNull @NotNull kala.collection.mutable.MutableMap<@NotNull AnyVar,@NotNull Term> map)
      Creates an instance of a Subst record class.
      Parameters:
      map - the value for the map record component
  • Method Details

    • subst

      public void subst(@NotNull @NotNull Subst subst)
    • overlap

      public kala.collection.immutable.ImmutableSeq<AnyVar> overlap(@NotNull @NotNull Subst subst)
    • addDirectly

      @NotNull public @NotNull Subst addDirectly(@NotNull @NotNull AnyVar var, @NotNull @NotNull Term term)
    • addAllDirectly

      @NotNull public @NotNull Subst addAllDirectly(@NotNull @NotNull Subst subst)
    • add

      @NotNull public @NotNull Subst add(@NotNull @NotNull AnyVar var, @NotNull @NotNull Term term)
    • add

      @NotNull public @NotNull Subst add(@NotNull @NotNull Subst subst)
    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • put

      public void put(LocalVar i, boolean isOne)
      Specified by:
      put in interface org.aya.guest0x0.cubical.CofThy.SubstObj<Term,LocalVar,Subst>
    • contradicts

      public boolean contradicts(LocalVar i, boolean newIsOne)
      Specified by:
      contradicts in interface org.aya.guest0x0.cubical.CofThy.SubstObj<Term,LocalVar,Subst>
    • asRef

      @Nullable public @Nullable LocalVar asRef(@NotNull @NotNull Term term)
      Specified by:
      asRef in interface org.aya.guest0x0.cubical.CofThy.SubstObj<Term,LocalVar,Subst>
    • derive

      @NotNull public @NotNull Subst derive()
      Specified by:
      derive in interface org.aya.guest0x0.cubical.CofThy.SubstObj<Term,LocalVar,Subst>
    • restr

      @NotNull public @NotNull org.aya.guest0x0.cubical.Restr<Term> restr(@NotNull @NotNull TyckState state, @NotNull @NotNull org.aya.guest0x0.cubical.Restr<Term> restr)
    • toDoc

      @NotNull public @NotNull org.aya.pretty.doc.Doc toDoc(@NotNull @NotNull org.aya.util.distill.DistillerOptions options)
      Specified by:
      toDoc in interface AyaDocile
    • 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.
    • map

      @NotNull public @NotNull kala.collection.mutable.MutableMap<@NotNull AnyVar,@NotNull Term> map()
      Returns the value of the map record component.
      Returns:
      the value of the map record component