Direction (Left / Right) #
A two-element enumeration shared across phonology and computability
substrates that need a notion of left-vs-right (FST scan direction,
context side, harmony spread direction, etc.). Promoted to Core/ so
that Theories/Phonology/Process/Alternation.lean::Side and
Core/Computability/Subregular/Function/Subsequential.lean::Direction
do not duplicate the same inductive type with the same case names.
Consumers should open Core (or qualify) and use Direction.left /
Direction.right directly. Phonology-side aliases Side := Direction
are acceptable when the Side name reads more naturally for the local
context (e.g., "context side" of a tier rule), but the underlying type
must be this one.
A left-vs-right enumeration.
Instances For
@[implicit_reducible]
Equations
- Core.instDecidableEqDirection x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Core.instReprDirection.repr Core.Direction.left prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Direction.left")).group prec✝
- Core.instReprDirection.repr Core.Direction.right prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Core.Direction.right")).group prec✝
Instances For
@[implicit_reducible]
Equations
- Core.instReprDirection = { reprPrec := Core.instReprDirection.repr }