# Where are correct type relationships described in IFC2X3?

**URL:** <https://forums.buildingsmart.org/t/where-are-correct-type-relationships-described-in-ifc2x3/3345>\
**Category:** Developers\
**Created:** [February 13, 2021, 5:15am UTC](https://forums.buildingsmart.org/t/where-are-correct-type-relationships-described-in-ifc2x3/3345 "2021-02-13T05:15:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [February 13, 2021, 5:15am UTC](https://forums.buildingsmart.org/t/where-are-correct-type-relationships-described-in-ifc2x3/3345/1 "2021-02-13T05:15:05Z")

</div>

In IFC4, the EXPRESS definition gives definitions of correct type assignments, such as:

```auto
	CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR 
  ('IFC4.IFCCOILTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType));

```

… however I could not find this for IFC2X3. Did I miss it?

---

<div class="post-metadata">

**Author:** ![tauscher](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/tauscher/32/816_2.png) [@tauscher](https://forums.buildingsmart.org/u/tauscher)\
**Post date:** [February 14, 2021, 6:42pm UTC](https://forums.buildingsmart.org/t/where-are-correct-type-relationships-described-in-ifc2x3/3345/2 "2021-02-14T18:42:49Z")

</div>

I think, you are right. It wouldn’t even be possible in IFC2x3 - at least not easily or in a nice way, because the inverse `IfcObject.IsTypedBy` is new in IFC4. Before, there was only the inverse `IsDefinedBy` and it covered references to the supertype level, that is all `IfcRelDefines` subtypes, not just `IfcRelDefinesByType`. Now, in IFC4, we have separate inverses `IsDefinedBy`, `IsTypedBy`, `IsDeclaredBy`.

---

<div class="post-metadata">

**Author:** ![Moult](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.buildingsmart.org/moult/32/196_2.png) [@Moult](https://forums.buildingsmart.org/u/Moult)\
**Post date:** [February 14, 2021, 10:58pm UTC](https://forums.buildingsmart.org/t/where-are-correct-type-relationships-described-in-ifc2x3/3345/3 "2021-02-14T22:58:46Z")

</div>

Cheers, because I couldn’t find where this was defined anywhere (as in, not just EXPRESS, but even informally), I made a series of assumptions and generated this - I hope it’s useful to other implementors:

> <https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.6.0/src/ifcopenshell-python/ifcopenshell/util/entity_to_type_map_2x3.json>
