Equality
Equality is a relation or operation that determines whether two values are considered equivalent according to applicable comparison rules.
Type-Driven Development with Idris
The relation that holds when two values or expressions have the same value.
- How it is used
- Uses equality tests for generic comparisons and equality evidence to express relationships required by dependent types.
- How deep it goes
- Develops a Nat-specific equality type, recursive checker, and proof transformation, then identifies a vector-length rewrite.
- Examples
- Uses list occurrence counting, natural-number equality proofs, and vector reversal to illustrate equality.
- What you can do after
- Build equality checks from scratch and use their results as evidence for dependent types.
Read how Type-Driven Development with Idris explains equality →
Pro Angular 16
The JavaScript identity operator compares operands without type coercion and requires their values and types to match.
- How it is used
- Uses strict equality in conditional tests when matching values must also match their types.
- How deep it goes
- Defines coercion and demonstrates behavior with listings, but does not develop the equality algorithm’s internal edge cases.
- Examples
- Compares numeric 5 with string "5", prints the result, and contrasts explicit any annotations with inferred TypeScript types.
- What you can do after
- Apply strict equality in conditional statements and recognize when TypeScript rejects comparisons between incompatible inferred types.
Fabulous Adventures in Data Structures and Algorithms
Term equality is structural equality in which constants have equal values, holes have equal names, and symbols have equal names and equal corresponding children.
- How it is used
- Defines when binary terms match so unification can make them equal through substitutions.
- How deep it goes
- Defines recursive structural rules and notes generated implementations, but defers equality extensions such as commutative symbols.
- Examples
- Uses nested immutable-stack terms with holes, constants, and symbols to demonstrate unequal structures.
- What you can do after
- Evaluate whether binary terms match and anticipate recursive equality costs in record-based implementations.
Read how Fabulous Adventures in Data Structures and Algorithms explains equality →
React in Depth
The strict equality operator (===) compares two JavaScript values without type conversion and returns true only when their types and equality conditions match.
- How it is used
- Uses strict equality to explain React hook dependency changes and referential identity.
- How deep it goes
- Explains primitive versus object comparison and React dependency effects, without descending into equality algorithm internals.
- Examples
- Uses "1" == 1, 2 === 1 + 1, {} !== {}, [] !== [], and useEffect dependency arrays.
- What you can do after
- Evaluate React dependency changes by distinguishing equal primitive data from stable or newly created object references.
Build a Reasoning Model (From Scratch)
The process of determining whether two mathematical expressions represent the same value or form symbolically.
- How it is used
- Uses symbolic comparison to verify free-form mathematical answers in verification-based evaluation.
- How deep it goes
- Builds comparison into extraction and normalization, then delegates symbolic checking to SymPy without detailing its internal algorithm.
- Examples
- Uses normalized model answers from the MATH-500 dataset as inputs to symbolic verification.
- What you can do after
- Evaluate free-form mathematical answers with a SymPy-based verification pipeline.
Read how Build a Reasoning Model (From Scratch) explains equality →
Also covered in
- Java Persistence with Spring Data and Hibernate epub
- JavaScript in DepthIn early access (MEAP)
- Math for Web Design
- Tiny CSS Projects
What to know first
- data conversionData conversion is the transformation of a value or data from one type, format, or representation to another, explicitly or implicitly.
- accuracyAccuracy is the degree to which a result agrees with a specified truth, reference, or criterion, commonly measured as the proportion of evaluated predictions that are correct.
- integerAn integer is a whole-number mathematical value, including negative numbers, zero, and positive numbers, with no fractional part.
- primitive typeA primitive type is a predefined basic data type representing a simple value rather than a composite structure of multiple values or fields.
Related concepts
- assignmentcontrasts with · Assignment is a programming-language operation that binds or stores an evaluated value in a variable, property, or other assignable location.
- booleanproduces · A Boolean is a logical value or data type representing truth or falsity, conventionally with the two values true and false.
- DecEqalternative to · DecEq is the Idris interface for types whose equality can be decided with evidence for either equality or inequality.
- data conversionaddresses · Data conversion is the transformation of a value or data from one type, format, or representation to another, explicitly or implicitly.
- comparisonkind of · A comparison is a language operation that evaluates a relationship, such as equality or ordering, between values and produces a result representing that relationship.
Questions about equality
What is equality?
Equality is a relation or operation that determines whether two values are considered equivalent according to applicable comparison rules.
Which Manning books explain equality?
Type-Driven Development with Idris, Pro Angular 16, Fabulous Adventures in Data Structures and Algorithms, React in Depth and Build a Reasoning Model (From Scratch).
What should I know before learning equality?
Manning books that teach equality usually introduce data conversion, accuracy, integer and primitive type first.
What is the difference between equality and assignment?
Equality is a relation or operation that determines whether two values are considered equivalent according to applicable comparison rules. Assignment is a programming-language operation that binds or stores an evaluated value in a variable, property, or other assignable location.
What is equality a kind of?
Equality is a kind of comparison. A comparison is a language operation that evaluates a relationship, such as equality or ordering, between values and produces a result representing that relationship.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




