This is a quick reminder, for more details have a look at the Agda documentation.
Shortcut | Effect |
---|---|
C-c C-l |
typecheck and highlight the current file |
C-c C-, |
get information about the hole under the cursor |
C-c C-. |
show both the type of the current hole and of the proposed filling |
C-c C-space |
give a solution |
C-c C-c |
case analysis on a variable (≈ an elimination rule) |
C-c C-r |
refine the hole (≈ an introduction rule) |
C-c C-a |
automatic fill |
middle click | definition of the term |
∧ | \and |
⊤ | \top |
→ | \to |
∨ | \or |
⊥ | \bot |
¬ | \neg |
∀ | \all |
Π | \Pi |
λ | \Gl |
∃ | \ex |
Σ | \Sigma |
≡ | \Equiv |
ℕ | \bN |
× | \times |
≤ | \le |
∈ | \in |
⊎ | \uplus |
∷ | \:: |
∎ | \qed |
₁ | \_1 |
⇒ | \=> |
⟨ | \< |
⟩ | \> |
-- This is a comment
{-
This is
a multiline
comment
-}
We can import all the definitions from ModuleName.agda
with
open import ModuleName
: ℕ → ℕ
pred = zero
pred zero (suc n) = n pred
: {ℓ : Level} {A : Type ℓ} → A → A
id {ℓ} {A} a = a id
Named captures are also supported:
: {ℓ : Level} {A : Type ℓ} → A → A
id {A = A} a = a id