+++ title = "Strict evaluation or lazy evaluation of predicates" date = "2023-02-14" author = "Yann Herklotz" tags = [] categories = [] backlinks = ["3c3f6"] forwardlinks = ["3c3f7a"] zettelid = "3c3f7" +++ Strict evaluation of predicates is the following: $$\frac{\theta \vdash p_1 \Downarrow b_1 \qquad \theta \vdash p_2 \Downarrowb_2}{\theta \vdash p_1 \land p_2 \Downarrow b_1 \mathbin{\texttt{\&}} b_2}$$ Lazy evaluation of predicates will instead have multiple rules that take into account when we know the result of the computation: $$\frac{\theta \vdash p_1 \Downarrow \perp}{\theta \vdash p_1 \land p_2 \Downarrow \perp}$$ $$\frac{\theta \vdash p_2 \Downarrow \perp}{\theta \vdash p_1 \land p_2 \Downarrow \perp}$$ $$\frac{\theta \vdash p_1 \Downarrow \top \qquad \theta \vdash p_2 \Downarrow \top}{\theta \vdash p_1 \land p_2 \Downarrow \top}$$