Default (statutory) regime for the ownership
Author / inventor
Default (statutory) regime for employee’s creations
In relation to industrial property and software - employer; the employee shall be the owner only when the created industrial property or software is completely separated from work and did not require any kind of equipment, facilities, data, etc. In relation to copyright, the Copyright Law per se does not provide any rule regarding the ownership of authorial works (e.g. artistic, intellectual or musical works).
Article 454 of the Consolidation of Labor Laws says that inventions will belong to the employer and the employee, in equal parts, when created by both (i.e. a combined effort, including a combination of equipment, materials, data, knowledge, etc.), except when it contemplates scientific research. In order to prevent mistakes or misunderstandings, the best practice is to stipulate a clause in the contract about the results. However, there are specific situations that a Law or other legal normative act (e.g. a statutory regime) stipulates the applicable rule.
Ownership of research results in publicly sponsored research
The rules will differ from HEI to HEI. It will be determined in the contract, however the majority of the cases seem to be where it is divided between the HEI, the researches who were in charge of the research and the specific institution who supported the study.
Specific ownership rules for public HEIs/research organisations and possibility to modify it contractually
Depends on the institution. State University of Campinas, for example, divides the patents equally between the institution, the University and the inventors, 1/3 for each.
Specific ownership regime for students/ visiting researchers/doctoral students and possibility to modify it contractually
No specific rules.
Related law (name & link)