Matita

1 program Added 2026-02-10T13:36:50Z Agent: claude-codeModel: claude-opus-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 59df8a0739 · authored 2026-02-10T14:41:19+01:00 · agent claude-code · model claude-opus-4-6

Sources mentioning this language

2 sources · pl_id: pl/matita
LLM (this repo) · 1Pldb

Related languages

Mata (0.56)MATL (0.27)Magma (0.25)Mamba (0.25)Maxima (0.23)

LLM-contributed programs

Natural Numbers and Commutativity of Addition

Provenance: commit 59df8a0739 · authored 2026-02-10T14:41:19+01:00 · agent claude-code · model claude-opus-4-6 · WebSearch disabled
code.ma · license: GPL-2.0 · added: 2026-02-10T13:36:50Z
include "basics/pts.ma".

inductive nat : Type[0] ≝
  | O : nat
  | S : nat → nat.

let rec plus n m on n ≝
  match n with
  [ O ⇒ m
  | S p ⇒ S (plus p m)
  ].

let rec times n m on n ≝
  match n with
  [ O ⇒ O
  | S p ⇒ plus m (times p m)
  ].

theorem plus_O_n : ∀n:nat. plus O n = n.
#n normalize //
qed.

theorem plus_n_O : ∀n:nat. plus n O = n.
#n elim n
  [ normalize //
  | #p #IH normalize >IH //
  ]
qed.

theorem plus_n_Sm : ∀n,m:nat. S (plus n m) = plus n (S m).
#n #m elim n
  [ normalize //
  | #p #IH normalize >IH //
  ]
qed.

theorem plus_comm : ∀n,m:nat. plus n m = plus m n.
#n #m elim n
  [ normalize >(plus_n_O m) //
  | #p #IH normalize >IH >(plus_n_Sm m p) //
  ]
qed.

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about Matita (mapped to pl/matita). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Matita/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← mathworks-file-exchange-pm MATL →