Scope Theory #
Abstract interface for theories that determine available scope readings.
A scope reading: an ordering of scope-taking elements.
Identifiers for scope-taking elements, in scope order (widest first)
Instances For
Equations
Instances For
Equations
- ScopeTheory.instBEqScopeReading.beq { ordering := a } { ordering := b } = (a == b)
- ScopeTheory.instBEqScopeReading.beq x✝¹ x✝ = false
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ScopeTheory.instInhabitedScopeReading.default = { ordering := default }
Instances For
The surface scope reading (linear order = scope order)
Equations
- ScopeTheory.ScopeReading.surface elements = { ordering := elements }
Instances For
Reverse (inverse) scope reading
Equations
- ScopeTheory.ScopeReading.inverse elements = { ordering := elements.reverse }
Instances For
The set of available scope readings for a form.
- readings : List ScopeReading
All available scope readings
At least one reading must be available
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Singleton: only one reading available
Instances For
Binary: exactly two readings (surface and inverse)
Equations
Instances For
Check if a specific reading is available
Equations
- a.hasReading r = a.readings.contains r
Instances For
Is the scope ambiguous (more than one reading)?
Instances For
Typeclass for theories that determine available scope readings.
- availableScopes : Form → AvailableScopes
Determine available scope readings for a form
Instances
Convenience function to get available scopes
Equations
Instances For
A ranked preference over scope readings.
- ranking : List ScopeReading
Readings ranked by preference (most preferred first)
Scores for each reading (higher = more preferred)
Rankings and scores must align
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Typeclass for theories that rank scope readings.
- preferScopes : Form → Context → AvailableScopes → ScopePreference
Rank available scope readings in context
Instances
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Binary scope availability: surface only, inverse only, or both.
- surfaceOnly : BinaryScopeAvailability
- inverseOnly : BinaryScopeAvailability
- ambiguous : BinaryScopeAvailability
Instances For
Equations
- ScopeTheory.instBEqBinaryScopeAvailability.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Convert to general AvailableScopes
Equations
- One or more equations did not get rendered due to their size.
- ScopeTheory.BinaryScopeAvailability.surfaceOnly.toAvailableScopes s1 s2 = ScopeTheory.AvailableScopes.singleton (ScopeTheory.ScopeReading.surface [s1, s2])
- ScopeTheory.BinaryScopeAvailability.inverseOnly.toAvailableScopes s1 s2 = ScopeTheory.AvailableScopes.singleton (ScopeTheory.ScopeReading.inverse [s1, s2])
Instances For
Typeclass for binary scope theories.
- binaryScope : BinaryScopeForm Form → BinaryScopeAvailability
Determine binary scope availability