Lean4
/-- The atomic Grothendieck topology: a sieve is covering iff it is nonempty.
For the pullback stability condition, we need the right Ore condition to hold.
See https://ncatlab.org/nlab/show/atomic+site, or [MM92] Chapter III, Section 2, example (f).
-/
def atomic (hro : RightOreCondition C) : GrothendieckTopology C
where
sieves X S := ∃ (Y : _) (f : Y ⟶ X), S f
top_mem' _ := ⟨_, 𝟙 _, ⟨⟩⟩
pullback_stable' := by
rintro X Y S h ⟨Z, f, hf⟩
rcases hro h f with ⟨W, g, k, comm⟩
refine ⟨_, g, ?_⟩
simp [comm, hf]
transitive' := by
rintro X S ⟨Y, f, hf⟩ R h
rcases h hf with ⟨Z, g, hg⟩
exact ⟨_, _, hg⟩