diff --git a/HOME_EXAM_Type_check_part2.md b/HOME_EXAM_Type_check_part2.md index bd6c199af1d477c853e2512d690f09c668e3290d..8774f973c369681de69a40263023f7f7bf5c6a8a 100644 --- a/HOME_EXAM_Type_check_part2.md +++ b/HOME_EXAM_Type_check_part2.md @@ -68,25 +68,25 @@ or ``` Not equals (!=): -```math +$` \frac{\Gamma \ \vdash \ e1 \ : \ bool \quad \Gamma \ \vdash \ e2 \ : \ bool}{\Gamma \ \vdash (e1 \ != \ e2) \ : \ bool} -``` +`$ or -```math +$` \frac{\Gamma \ \vdash \ e1 \ : \ i32 \quad \Gamma \ \vdash \ e2 \ : \ i32}{\Gamma \ \vdash (e1 \ != \ e2) \ : \ bool} -``` +`$ ### Assignment Given the type $`\tau`$, variable $`x`$ and value $`n`$ -```math +$` \frac{\Gamma \ \vdash \ x \ : \ \tau \quad \Gamma \ \vdash \ n \ : \ \tau}{\lang x := n, \sigma \rang \ \Darr \ \Gamma \ \vdash x \ : \ \tau} -``` +`$ ### **let** assignment -```math +$` \frac{\Gamma \ \vdash \ n \ : \ \tau}{\lang \text{let} \ x \ : \ \tau \ := \ n, \sigma \rang \ \Darr \ \Gamma \ \vdash x \ : \ \tau} -``` +`$ ### **while** statement The condition, $`b`$, of the while statement