Formalising Mathematics

Contents:

  • Introduction
  • Getting Lean running on your computer
  • Part A: the mathematics
  • Part B: Lean tips
  • Part C: Tactics
    • Tactic cheatsheet
    • Tactic documentation
      • apply
      • assumption
      • by_cases
      • by_contra
      • cases
      • change
      • choose
      • convert
      • exact
      • exfalso
      • ext
      • have
      • induction
      • intro
      • intros
      • left
      • linarith
      • nlinarith
      • norm_num
      • nth_rewrite
      • obtain
      • rcases
      • refine
      • refl
      • right
        • Summary
        • Details
        • Further notes
      • ring
      • rintro
      • rw
      • simp
      • simpa
      • specialize
      • split
      • triv
      • use
Formalising Mathematics
  • Part C: Tactics
  • Tactic documentation
  • right
  • View page source

right

Summary

There are two ways to prove ⊢ P ∨ Q; you can either prove P or you can prove Q. If you want to change the goal to Q then use the right tactic.

Details

It’s a theorem in Lean that Q → P ∨ Q, and the right tactic applies this theorem.

Further notes

See also left. More generally, if your goal is an inductive type with two constructors, left applies the first constructor, and right applies the second one.

Previous Next

© Copyright 2022, Kevin Buzzard.

Built with Sphinx using a theme provided by Read the Docs.