Why3

1 program Added 2025-11-05T12:01:43Z Model: x-ai/grok-4-fastTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 9ffcf62e3d · authored 2025-11-05T13:01:43+01:00 · model x-ai/grok-4-fast

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

WhyML (0.31)When (0.20)Whirl (0.18)Whiley (0.17)Whenever (0.14)

LLM-contributed programs

Introductory Why3 Example

Provenance: commit 9ffcf62e3d · authored 2025-11-05T13:01:43+01:00 · model x-ai/grok-4-fast · Temp 0.4
code.mlw · license: LGPL-2.1 · added: 2025-11-05T12:01:43Z
(*
  This file is part of the Why3 platform, distributed under the terms
  of the Lesser General Public License version 2.1, with the special
  clause on the linking of executable modules.
  Copyright (C) 2009-2023  CNRS
    Jean-Christophe Filliâtre (filliatre@lri.fr)

  François Bobot (bobot@lri.fr)

  Claude Marché (marché@lri.fr)

  Guillaume Melquiond (melquiond@lri.fr)

  Andrei Paskevich (paskevich@lri.fr)
*)

module Intro

  use import int.Int

  let even (n:int) : bool = n mod 2 = 0

  goal G1: forall n:int. even n <-> n mod 2 = 0
    intros n. unfold even. reflexivity. qed

  goal G2: forall n:int. even (n + 2) <-> even n
    intros n. unfold even. rewrite (plus_remainder n 2). ring. qed

end

Contribute — propose a file extension

Tell us where to find evidence about Why3 (mapped to pl/why3). 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/Why3/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Why tho Why? Why? Why? →