Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support some Unicode syntax #61

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Support some Unicode syntax #61

merged 1 commit into from
Jul 4, 2023

Conversation

fizruk
Copy link
Member

@fizruk fizruk commented Jul 4, 2023

Specifically the following Unicode syntax is added and is used by default when pretty-printing:

  • I × J (use \x or \times) for cube products (ASCII version: I * J)
  • (use \top) for the top tope (ASCII version: TOP)
  • (use \bot) for the bottom tope (ASCII version: BOT)
  • t ≡ s (use \equiv) for point equality tope (ASCII version: t === s)
  • t ≤ s (use \leq or (+<) on macOS) for point inequality tope (ASCII version: t <= s)
  • φ ∧ ψ (use \and) for tope conjunction (ASCII version: phi /\ psi)
  • φ ∨ ψ (use \or) for tope disjunction (ASCII version: phi \/ psi)
  • A → B (use \to) for function types (ASCII version: A -> B)
  • \ t → s (use \to) for lambda abstraction (ASCII version: \ t -> s)
  • π₁ t and π₂ t (use \pi\1 and \pi\2) for projections (ASCII versions: first t and second t)
  • φ ↦ a (use \mapsto) for mappings used in extension types and recOR (ASCII version: phi |-> a)
  • *₁ (use \1) for the only point in the unit cube (ASCII version: *_1)
  • 0₂ (use \2) for point 0 in the directed interval 2 (ASCII version: 0_2)
  • 1₂ (use \2) for point 1 in the directed interval 2 (ASCII version: 1_2)

The following syntax is NOT added on purpose:

  • λ x → t — we want to keep λ as a valid variable name;

The following syntax was already supported but will now also be used by the pretty-printer:

  • Σ (x : A), B x (use \Sigma) for the dependent sum types

The following syntax is marked as deprecated with warnings issued via Debug.Trace:

  • recOR(ψ, φ, a_ψ, a_φ) is deprecated since the order of arguments is ad hoc; instead recOR(ψ ↦ a_ψ, φ ↦ a_φ) should be used
  • The use of angle brackets (< and >) in extension types <{t : I | ψ} → A t [ φ t ↦ a t ]> is now deprecated (it actually was deprecated since v0.2.0) since it is now a compound type anyway; instead, omit the angle brackets, possibly replacing them with parentheses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant