[KongchangAI]
ConceptHoare Triple / Hoare 逻辑 / 公理语义

Hoare Triple

The Hoare triple is a fundamental specification form in program logic, written {P} C {Q}, where P is the precondition, C is a command, and Q is the postcondition. It states that if P holds before the command executes, then Q holds after the command terminates. Through composition rules for sequencing, conditionals, and loops, complex program correctness can be decomposed into local condition verification, forming a core basis of formal verification and specification theory.

Timeline (last 90 days)

Oct 16

A Hoare triple has the form {P} C {Q}, where P is the precondition, C is the command, and Q is the postcondition, with the meaning: if P holds before C executes, then Q holds when C terminates (partial correctness), and adding termination gives total correctness.

Unverified50%
Oct 16

The specification style in Lean is a modern variant of the Hoare style: preconditions as the theorem's hypothesis parameters, postconditions as the conclusion.

Unverified50%

All Facts (2)

Source Articles